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

📄 ctreedemo.cpp

📁 数据库的递归查找程序
💻 CPP
字号:
//================================================================================
//	这是一个例子程序,主要用于演示ADO和CTREE控件的使用
//	在写代码期间,改成了VCHELP精选问题的简易离线浏览
//	我们在这个小程序中将会用到很多小技巧
//      1、	ADO操作数据库
//		2、	树形控件的使用
//		3、	控件大小随着窗口变化
//		4、	对话框之间的通讯
//
//参考资料:VCHELP网站的部分文章
//          VC知识库网站的部分文章
//程序编写:雷神
//日期:    200211
//修改计划:也不能算修改了,因为有时间我会重写,主要会尝试将ADO和CTREE封装起来
//			另外不会再使用对话框,在界面也会有较大的改变
//			还有需要增加更多的功能,例如树的拖放、搜索等等。
//			当然这不知道是什么时候的事了。呵呵。
//关于版权:此程序没有版权,你可以随意拷贝修改。
//          如果你愿意并保留了以上信息,雷神对此表示感谢!
//关于问题:如果发现程序有BUG请和我联系
//个人主页:http://www.ai361.com
//电子邮件:lsmodel@ai361.com
//
//			*************************	
//			*   最后祝大家编程愉快。*
//			*************************
//
//================================================================================

// CTreeDemo.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "CTreeDemo.h"
#include "CTreeDemoDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CCTreeDemoApp

BEGIN_MESSAGE_MAP(CCTreeDemoApp, CWinApp)
	//{{AFX_MSG_MAP(CCTreeDemoApp)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG
	ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCTreeDemoApp construction

CCTreeDemoApp::CCTreeDemoApp()
{
	// TODO: add construction code here,
	// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CCTreeDemoApp object

CCTreeDemoApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CCTreeDemoApp initialization

BOOL CCTreeDemoApp::InitInstance()
{
	AfxOleInit();
	AfxEnableControlContainer();

	// Standard initialization
	// If you are not using these features and wish to reduce the size
	//  of your final executable, you should remove from the following
	//  the specific initialization routines you do not need.

#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif

	CCTreeDemoDlg dlg;
	m_pMainWnd = &dlg;
	int nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with OK
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with Cancel
	}

	// Since the dialog has been closed, return FALSE so that we exit the
	//  application, rather than start the application's message pump.
	return FALSE;
}

⌨️ 快捷键说明

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