資源簡介
我大學時候設計的一個最最簡單的mfc坦克大戰,適合最最最最最基礎的人群,C++實現一個小demo,適合初級玩家試試水

代碼片段和文件信息
//?122055116.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“122055116.h“
#include?“MainFrm.h“
#include?“122055116Doc.h“
#include?“122055116View.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMy122055116App
BEGIN_MESSAGE_MAP(CMy122055116App?CWinApp)
//{{AFX_MSG_MAP(CMy122055116App)
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()
/////////////////////////////////////////////////////////////////////////////
//?CMy122055116App?construction
CMy122055116App::CMy122055116App()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CMy122055116App?object
CMy122055116App?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CMy122055116App?initialization
BOOL?CMy122055116App::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(CMy122055116Doc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CMy122055116View));
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.
m_pMainWn
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1385840??2014-10-29?20:08??122055116\122055116.aps
?????文件???????2356??2014-10-29?20:08??122055116\122055116.clw
?????文件???????4302??2014-06-20?11:02??122055116\122055116.cpp
?????文件???????5169??2014-06-20?22:47??122055116\122055116.dsp
?????文件????????543??2014-06-15?17:41??122055116\122055116.dsw
?????文件???????1399??2014-06-15?17:29??122055116\122055116.h
?????文件??????99328??2014-10-29?20:36??122055116\122055116.ncb
?????文件??????54784??2014-10-29?20:36??122055116\122055116.opt
?????文件????????913??2014-10-29?20:08??122055116\122055116.plg
?????文件??????12102??2014-10-29?20:08??122055116\122055116.rc
?????文件???????1836??2014-06-15?17:29??122055116\122055116Doc.cpp
?????文件???????1522??2014-06-15?17:29??122055116\122055116Doc.h
?????文件???????6260??2014-06-21?22:39??122055116\122055116View.cpp
?????文件???????2008??2014-06-21?10:20??122055116\122055116View.h
?????文件????1736757??2014-10-29?20:08??122055116\Debug\122055116.exe
?????文件?????321848??2014-10-29?20:08??122055116\Debug\122055116.ilk
?????文件??????23096??2014-06-21?10:20??122055116\Debug\122055116.obj
?????文件????5498748??2014-06-15?17:39??122055116\Debug\122055116.pch
?????文件?????492544??2014-10-29?20:08??122055116\Debug\122055116.pdb
?????文件????1348216??2014-10-29?20:08??122055116\Debug\122055116.res
?????文件??????14820??2014-06-15?17:39??122055116\Debug\122055116Doc.obj
?????文件??????29596??2014-10-26?11:30??122055116\Debug\122055116View.obj
?????文件???????7083??2014-06-20?23:10??122055116\Debug\Game.obj
?????文件??????19760??2014-06-15?17:39??122055116\Debug\MainFrm.obj
?????文件?????105471??2014-06-15?17:39??122055116\Debug\StdAfx.obj
?????文件?????214016??2014-10-29?20:08??122055116\Debug\vc60.idb
?????文件?????364544??2014-10-26?11:30??122055116\Debug\vc60.pdb
?????文件????????723??2014-06-20?23:10??122055116\Game.cpp
?????文件????????619??2014-06-20?22:41??122055116\Game.h
?????文件???????2510??2014-06-15?17:29??122055116\MainFrm.cpp
............此處省略21個文件信息
評論
共有 條評論