⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mytree.cpp

📁 一个用VC++6.0做的图书馆管理系统,界面精致,功能详细
💻 CPP
字号:
// MyTree.cpp : implementation file
//

#include "stdafx.h"
#include "Library.h"
#include "MyTree.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMyTree

IMPLEMENT_DYNCREATE(CMyTree, CTreeView)

CMyTree::CMyTree()
{
}

CMyTree::~CMyTree()
{
}


BEGIN_MESSAGE_MAP(CMyTree, CTreeView)
	//{{AFX_MSG_MAP(CMyTree)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyTree drawing

void CMyTree::OnDraw(CDC* pDC)
{
	CDocument* pDoc = GetDocument();
	// TODO: add draw code here
}

/////////////////////////////////////////////////////////////////////////////
// CMyTree diagnostics

#ifdef _DEBUG
void CMyTree::AssertValid() const
{
	CTreeView::AssertValid();
}

void CMyTree::Dump(CDumpContext& dc) const
{
	CTreeView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMyTree message handlers

void CMyTree::OnInitialUpdate() 
{
	CTreeView::OnInitialUpdate();
	
	HTREEITEM h_root;
	CString tempstr;
	h_root = this->GetTreeCtrl().InsertItem("功能列表",0,0);
	for(int i = 0;i<NODECOUNT;i++)
	{
		tempstr =  m_Treenodes[i];
		this->GetTreeCtrl().InsertItem(tempstr,1,2,h_root);
	}
	this->GetTreeCtrl().Expand(h_root,TVE_EXPAND);
	this->GetTreeCtrl().SetBkColor(RGB(47,187,255));
	this->GetTreeCtrl().SetTextColor(RGB(0,0,255));
	m_font.CreateFont(0,0,0,0,FW_BOLD,0,0,0,DEFAULT_CHARSET,OUT_STRING_PRECIS,CLIP_TT_ALWAYS,DEFAULT_QUALITY,DEFAULT_PITCH,"宋体");
	this->SetFont(&m_font);
	// TODO: Add your specialized code here and/or call the base class
	
}

⌨️ 快捷键说明

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