?? ctreedemo.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 + -