資源簡介
本程序是用mfc實現的十字路口交通燈的程序。

代碼片段和文件信息
//?Cross_Demo.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Cross_Demo.h“
#include?“Cross_DemoDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CCross_DemoApp
BEGIN_MESSAGE_MAP(CCross_DemoApp?CWinApp)
//{{AFX_MSG_MAP(CCross_DemoApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CCross_DemoApp?construction
CCross_DemoApp::CCross_DemoApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CCross_DemoApp?object
CCross_DemoApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CCross_DemoApp?initialization
BOOL?CCross_DemoApp::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
CCross_DemoDlg?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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????19977??2010-12-06?20:23??Cross_DemoDlg.cpp
?????文件????????212??2010-12-04?10:42??StdAfx.cpp
?????文件???????2892??2010-12-06?20:45??Cross_Demo.clw
?????文件????????735??2010-12-06?20:44??Cross_Demo.plg
?????文件??????99328??2010-12-06?21:00??Cross_Demo.ncb
?????文件??????50688??2010-12-06?21:00??Cross_Demo.opt
?????文件???????5774??2010-12-06?13:39??Cross_Demo.dsp
?????文件????????545??2010-12-04?10:42??Cross_Demo.dsw
?????文件???????9036??2010-12-06?20:45??Cross_Demo.rc
?????文件???????3651??2010-12-04?10:42??ReadMe.txt
?????文件???????1346??2010-12-04?20:12??res\bitmap1.bmp
?????文件???????1270??2010-12-05?22:03??res\bitmap2.bmp
?????文件???????1270??2010-12-05?16:13??res\bmp00001.bmp
?????文件???????1270??2010-12-04?20:52??res\bmp00002.bmp
?????文件???????1270??2010-12-04?20:52??res\bmp00003.bmp
?????文件???????1270??2010-12-04?20:52??res\bmp00004.bmp
?????文件???????1270??2010-12-04?20:52??res\bmp00005.bmp
?????文件??????43122??2010-12-04?14:56??res\color.bmp
?????文件???????1346??2010-12-04?20:16??res\color1.bmp
?????文件???????1078??2010-12-04?10:42??res\Cross_Demo.ico
?????文件????????401??2010-12-02?22:04??res\Cross_Demo.rc2
?????文件???????1346??2010-12-04?20:17??res\green.bmp
?????文件???????1346??2010-12-04?20:17??res\OFF.bmp
?????文件???????1346??2010-12-04?20:10??res\red.bmp
?????文件???????1270??2010-12-04?14:07??res\redon1.bmp
?????文件???????1270??2010-12-04?14:07??res\redon10.bmp
?????文件???????1270??2010-12-04?14:07??res\redon11.bmp
?????文件???????1270??2010-12-04?14:07??res\redon2.bmp
?????文件???????1270??2010-12-04?14:07??res\redon3.bmp
?????文件???????1270??2010-12-04?14:07??res\redon4.bmp
............此處省略17個文件信息
評論
共有 條評論