chattersview.cpp

来自「利用CSocket类编写的一个网络聊天程序,加深对CSocket类的基本应用的认」· C++ 代码 · 共 68 行

CPP
68
字号
// 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);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?