資源簡(jiǎn)介
MFC模擬10層樓電梯運(yùn)行程序,美觀大方,可以連續(xù)選擇樓層。

代碼片段和文件信息
//?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
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件??????19558??2011-04-28?12:49??電梯\Debug\MainFrm.obj
?????文件?????105509??2011-05-09?22:32??電梯\Debug\StdAfx.obj
?????文件????1371751??2011-05-09?22:32??電梯\Debug\StdAfx.sbr
?????文件????5506048??2011-06-09?20:05??電梯\Debug\test.bsc
?????文件?????127049??2011-06-09?20:05??電梯\Debug\test.exe
?????文件?????966200??2011-06-09?20:05??電梯\Debug\test.ilk
?????文件??????13596??2011-05-09?22:32??電梯\Debug\test.obj
?????文件????6925448??2011-05-09?22:32??電梯\Debug\TEST.pch
?????文件?????459776??2011-06-09?20:05??電梯\Debug\TEST.pdb
?????文件???????3628??2011-05-20?00:14??電梯\Debug\TEST.res
?????文件??????????0??2011-05-09?22:32??電梯\Debug\test.sbr
?????文件??????71084??2011-06-09?20:05??電梯\Debug\testDlg.obj
?????文件??????????0??2011-06-09?20:05??電梯\Debug\testDlg.sbr
?????文件??????14262??2011-04-28?12:49??電梯\Debug\TESTDoc.obj
?????文件??????22466??2011-04-29?19:39??電梯\Debug\TESTView.obj
?????文件?????246784??2011-06-18?12:08??電梯\Debug\vc60.idb
?????文件?????364544??2011-06-09?20:05??電梯\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
?????文件???????2154??2011-05-19?20:30??電梯\resource.h
?????文件????????206??2011-05-09?20:39??電梯\StdAfx.cpp
?????文件???????1054??2011-05-09?20:39??電梯\StdAfx.h
?????文件??????23132??2011-06-18?12:08??電梯\test.aps
?????文件???????2403??2011-06-18?12:09??電梯\TEST.clw
?????文件???????2035??2011-05-09?20:39??電梯\TEST.cpp
............此處省略19個(gè)文件信息
評(píng)論
共有 條評(píng)論