www.pudn.com > 3.rar > ChatServerView.cpp


// ChatServerView.cpp : implementation of the CChatServerView class 
// 
 
#include "stdafx.h" 
#include "ChatServer.h" 
 
#include "ChatServerDoc.h" 
#include "ChatServerView.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CChatServerView 
 
IMPLEMENT_DYNCREATE(CChatServerView, CListView) 
 
BEGIN_MESSAGE_MAP(CChatServerView, CListView) 
	//{{AFX_MSG_MAP(CChatServerView) 
		// 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 
	// Standard printing commands 
	ON_COMMAND(ID_FILE_PRINT, CListView::OnFilePrint) 
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CListView::OnFilePrint) 
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CListView::OnFilePrintPreview) 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CChatServerView construction/destruction 
 
CChatServerView::CChatServerView() 
{ 
	// TODO: add construction code here 
 
} 
 
CChatServerView::~CChatServerView() 
{ 
} 
 
BOOL CChatServerView::PreCreateWindow(CREATESTRUCT& cs) 
{ 
	// TODO: Modify the Window class or styles here by modifying 
	//  the CREATESTRUCT cs 
 
	return CListView::PreCreateWindow(cs); 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CChatServerView drawing 
 
void CChatServerView::OnDraw(CDC* pDC) 
{ 
	CChatServerDoc* pDoc = GetDocument(); 
	ASSERT_VALID(pDoc); 
	// TODO: add draw code for native data here 
} 
 
void CChatServerView::OnInitialUpdate() 
{ 
	CListView::OnInitialUpdate(); 
 
 
	// TODO: You may populate your ListView with items by directly accessing 
	//  its list control through a call to GetListCtrl(). 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CChatServerView printing 
 
BOOL CChatServerView::OnPreparePrinting(CPrintInfo* pInfo) 
{ 
	// default preparation 
	return DoPreparePrinting(pInfo); 
} 
 
void CChatServerView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) 
{ 
	// TODO: add extra initialization before printing 
} 
 
void CChatServerView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) 
{ 
	// TODO: add cleanup after printing 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CChatServerView diagnostics 
 
#ifdef _DEBUG 
void CChatServerView::AssertValid() const 
{ 
	CListView::AssertValid(); 
} 
 
void CChatServerView::Dump(CDumpContext& dc) const 
{ 
	CListView::Dump(dc); 
} 
 
CChatServerDoc* CChatServerView::GetDocument() // non-debug version is inline 
{ 
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CChatServerDoc))); 
	return (CChatServerDoc*)m_pDocument; 
} 
#endif //_DEBUG 
 
///////////////////////////////////////////////////////////////////////////// 
// CChatServerView message handlers