資源簡介
二叉樹(基于Mfc的程序開發),具有二叉樹的先序遍歷、中序遍歷、后續遍歷、以及非遞歸中序遍歷、以及樹形控件顯示

代碼片段和文件信息
//?Binary?Trees.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Binary?Trees.h“
#include?“MainFrm.h“
#include?“Binary?TreesDoc.h“
#include?“Binary?TreesView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CBinaryTreesApp
BEGIN_MESSAGE_MAP(CBinaryTreesApp?CWinApp)
//{{AFX_MSG_MAP(CBinaryTreesApp)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
//?Standard?file?based?document?commands
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
//?Standard?print?setup?command
ON_COMMAND(ID_FILE_PRINT_SETUP?CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CBinaryTreesApp?construction
CBinaryTreesApp::CBinaryTreesApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CBinaryTreesApp?object
CBinaryTreesApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CBinaryTreesApp?initialization
BOOL?CBinaryTreesApp::InitInstance()
{
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
//?Change?the?registry?key?under?which?our?settings?are?stored.
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization.
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
LoadStdProfileSettings();??//?Load?standard?INI?file?options?(including?MRU)
//?Register?the?application‘s?document?templates.??Document?templates
//??serve?as?the?connection?between?documents?frame?windows?and?views.
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CBinaryTreesDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CBinaryTreesView));
AddDocTemplate(pDocTemplate);
//?Parse?command?line?for?standard?shell?commands?DDE?file?open
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?Dispatch?commands?specified?on?the?command?line
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????47372??2009-05-20?17:43???二叉樹\Binary?Trees.aps
?????文件???????3427??2009-05-20?17:46???二叉樹\Binary?Trees.clw
?????文件???????4303??2009-05-15?19:48???二叉樹\Binary?Trees.cpp
?????文件???????4893??2009-05-15?22:22???二叉樹\Binary?Trees.dsp
?????文件????????549??2009-05-15?19:48???二叉樹\Binary?Trees.dsw
?????文件???????1414??2009-05-15?19:48???二叉樹\Binary?Trees.h
?????文件??????91136??2009-05-20?17:47???二叉樹\Binary?Trees.ncb
?????文件??????48640??2009-05-20?17:47???二叉樹\Binary?Trees.opt
?????文件???????1273??2009-05-20?17:46???二叉樹\Binary?Trees.plg
?????文件??????13702??2009-05-20?17:43???二叉樹\Binary?Trees.rc
?????文件???????1845??2009-05-15?19:48???二叉樹\Binary?TreesDoc.cpp
?????文件???????1531??2009-05-15?19:48???二叉樹\Binary?TreesDoc.h
?????文件???????6061??2009-05-20?17:46???二叉樹\Binary?TreesView.cpp
?????文件???????2283??2009-05-20?16:48???二叉樹\Binary?TreesView.h
?????文件???????1635??2009-05-18?22:33???二叉樹\Btrees.cpp
?????文件???????1395??2009-05-15?20:18???二叉樹\Btrees.h
?????文件???????2400??2009-05-15?20:40???二叉樹\MainFrm.cpp
?????文件???????1440??2009-05-15?20:40???二叉樹\MainFrm.h
?????文件???????4448??2009-05-15?19:48???二叉樹\ReadMe.txt
?????文件???????1078??2009-05-15?19:48???二叉樹\res\Binary?Trees.ico
?????文件????????404??2009-05-15?19:48???二叉樹\res\Binary?Trees.rc2
?????文件???????1078??2009-05-15?19:48???二叉樹\res\Binary?TreesDoc.ico
?????文件????????326??2009-05-15?20:25???二叉樹\res\cursor1.cur
?????文件???????1078??2009-05-15?19:48???二叉樹\res\Toolbar.bmp
?????文件???????1614??2009-05-19?23:04???二叉樹\resource.h
?????文件????????214??2009-05-15?19:48???二叉樹\StdAfx.cpp
?????文件???????1054??2009-05-15?19:48???二叉樹\StdAfx.h
?????文件???????1133??2009-05-19?23:39???二叉樹\新建?文本文檔.txt
?????目錄??????????0??2011-06-10?12:52???二叉樹\res
?????目錄??????????0??2011-06-10?12:52???二叉樹
............此處省略3個文件信息
評論
共有 條評論