www.pudn.com > 17123337.rar > TCPClientView.cpp


// TCPClientView.cpp : implementation of the CTCPClientView class 
// 
 
#include "stdafx.h" 
#include "TCPClient.h" 
 
#include "TCPClientDoc.h" 
#include "TCPClientView.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CTCPClientView 
 
IMPLEMENT_DYNCREATE(CTCPClientView, CEditView) 
 
BEGIN_MESSAGE_MAP(CTCPClientView, CEditView) 
	//{{AFX_MSG_MAP(CTCPClientView) 
		// NOTE - the ClassWizard will add and remove mapping macros here. 
		//    DO NOT EDIT what you see in these blocks of generated code! 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CTCPClientView construction/destruction 
 
CTCPClientView::CTCPClientView() 
{ 
	// TODO: add construction code here 
 
} 
 
CTCPClientView::~CTCPClientView() 
{ 
} 
 
BOOL CTCPClientView::PreCreateWindow(CREATESTRUCT& cs) 
{ 
	// TODO: Modify the Window class or styles here by modifying 
	//  the CREATESTRUCT cs 
	BOOL bPreCreated = CEditView::PreCreateWindow(cs); 
	cs.style = AFX_WS_DEFAULT_VIEW | WS_VSCROLL | ES_AUTOHSCROLL | 
		ES_AUTOVSCROLL | ES_MULTILINE | ES_NOHIDESEL; 
	cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL);	// Enable word-wrapping 
	return bPreCreated; 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CTCPClientView drawing 
 
void CTCPClientView::OnDraw(CDC* pDC) 
{ 
	CTCPClientDoc* pDoc = GetDocument(); 
	ASSERT_VALID(pDoc); 
	// TODO: add draw code for native data here 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CTCPClientView diagnostics 
 
#ifdef _DEBUG 
void CTCPClientView::AssertValid() const 
{ 
	CEditView::AssertValid(); 
} 
 
void CTCPClientView::Dump(CDumpContext& dc) const 
{ 
	CEditView::Dump(dc); 
} 
 
CTCPClientDoc* CTCPClientView::GetDocument() // non-debug version is inline 
{ 
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTCPClientDoc))); 
	return (CTCPClientDoc*)m_pDocument; 
} 
#endif //_DEBUG 
 
///////////////////////////////////////////////////////////////////////////// 
// CTCPClientView message handlers