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


// ChattersView.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "ChatClient.h" 
#include "ChattersView.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CChattersView 
 
IMPLEMENT_DYNCREATE(CChattersView, CTreeView) 
 
CChattersView::CChattersView() 
{ 
} 
 
CChattersView::~CChattersView() 
{ 
} 
 
 
BEGIN_MESSAGE_MAP(CChattersView, CTreeView) 
	//{{AFX_MSG_MAP(CChattersView) 
		// NOTE - the ClassWizard will add and remove mapping macros here. 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CChattersView drawing 
 
void CChattersView::OnDraw(CDC* pDC) 
{ 
	CDocument* pDoc = GetDocument(); 
	// TODO: add draw code here 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CChattersView diagnostics 
 
#ifdef _DEBUG 
void CChattersView::AssertValid() const 
{ 
	CTreeView::AssertValid(); 
} 
 
void CChattersView::Dump(CDumpContext& dc) const 
{ 
	CTreeView::Dump(dc); 
} 
#endif //_DEBUG 
 
///////////////////////////////////////////////////////////////////////////// 
// CChattersView message handlers 
void CChattersView::ClearChattersList() 
{ 
	GetTreeCtrl().DeleteAllItems(); 
} 
 
void CChattersView::AddToChattersList(CString sName) 
{ 
	GetTreeCtrl().InsertItem(sName, 0, 0, TVI_ROOT, TVI_LAST); 
}