資源簡介
實現20多個教學樓之間最短路徑的選擇,較為復雜,很好的學習資源。

代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“TEST.h“
#include?“MainFrm.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMainframe
IMPLEMENT_DYNCREATE(CMainframe?CframeWnd)
BEGIN_MESSAGE_MAP(CMainframe?CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code?!
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static?UINT?indicators[]?=
{
ID_SEPARATOR???????????//?status?line?indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?construction/destruction
CMainframe::CMainframe()
{
//?TODO:?add?member?initialization?code?here
}
CMainframe::~CMainframe()
{
}
int?CMainframe::OnCreate(LPCREATESTRUCT?lpCreateStruct)
{
if?(CframeWnd::OnCreate(lpCreateStruct)?==?-1)
return?-1;
if?(!m_wndToolBar.CreateEx(this?TBstyle_FLAT?WS_CHILD?|?WS_VISIBLE?|?CBRS_TOP
|?CBRS_GRIPPER?|?CBRS_TOOLTIPS?|?CBRS_FLYBY?|?CBRS_SIZE_DYNAMIC)?||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed?to?create?toolbar\n“);
return?-1;??????//?fail?to?create
}
if?(!m_wndStatusBar.Create(this)?||
!m_wndStatusBar.SetIndicators(indicators
??sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed?to?create?status?bar\n“);
return?-1;??????//?fail?to?create
}
//?TODO:?Delete?these?three?lines?if?you?don‘t?want?the?toolbar?to
//??be?dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
return?0;
}
BOOL?CMainframe::PreCreateWindow(CREATESTRUCT&?cs)
{
if(?!CframeWnd::PreCreateWindow(cs)?)
return?FALSE;
//?TODO:?Modify?the?Window?class?or?styles?here?by?modifying
//??the?CREATESTRUCT?cs
return?TRUE;
}
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?diagnostics
#ifdef?_DEBUG
void?CMainframe::AssertValid()?const
{
CframeWnd::AssertValid();
}
void?CMainframe::Dump(CDumpContext&?dc)?const
{
CframeWnd::Dump(dc);
}
#endif?//_DEBUG
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?message?handlers
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????19558??2011-04-28?12:49??導航\Debug\MainFrm.obj
?????文件?????105561??2011-05-25?22:54??導航\Debug\StdAfx.obj
?????文件????1371769??2011-05-25?22:54??導航\Debug\StdAfx.sbr
?????文件????5497856??2011-06-09?22:42??導航\Debug\test.bsc
?????文件?????188479??2011-06-09?22:42??導航\Debug\test.exe
?????文件????1295500??2011-06-09?22:42??導航\Debug\test.ilk
?????文件??????13672??2011-05-25?22:54??導航\Debug\test.obj
?????文件????6933936??2011-05-25?22:54??導航\Debug\TEST.pch
?????文件?????459776??2011-06-09?22:42??導航\Debug\TEST.pdb
?????文件???????3900??2011-06-09?11:33??導航\Debug\TEST.res
?????文件??????????0??2011-05-25?22:54??導航\Debug\test.sbr
?????文件?????140215??2011-06-09?22:42??導航\Debug\testDlg.obj
?????文件??????????0??2011-06-09?22:42??導航\Debug\testDlg.sbr
?????文件??????14262??2011-04-28?12:49??導航\Debug\TESTDoc.obj
?????文件??????22466??2011-04-29?19:39??導航\Debug\TESTView.obj
?????文件?????238592??2011-06-18?12:10??導航\Debug\vc60.idb
?????文件?????372736??2011-06-09?22:42??導航\Debug\vc60.pdb
?????文件???????2505??2011-04-28?12:37??導航\MainFrm.cpp
?????文件???????1581??2011-04-28?12:37??導航\MainFrm.h
?????文件???????3543??2011-05-09?20:39??導航\ReadMe.txt
?????文件???????1078??2011-05-09?20:39??導航\res\TEST.ico
?????文件????????396??2011-05-09?20:39??導航\res\TEST.rc2
?????文件???????1078??2011-04-28?12:37??導航\res\TESTDoc.ico
?????文件???????1078??2011-04-28?12:37??導航\res\Toolbar.bmp
?????文件???????2246??2011-06-09?08:49??導航\resource.h
?????文件??????????0??2011-05-29?23:08??導航\Shortpath.cpp
?????文件????????205??2011-05-29?23:07??導航\Shortpath.h
?????文件????????206??2011-05-09?20:39??導航\StdAfx.cpp
?????文件???????1054??2011-05-09?20:39??導航\StdAfx.h
?????文件??????23276??2011-06-18?12:10??導航\test.aps
............此處省略21個文件信息
評論
共有 條評論