資源簡介
雙緩存版VC++推箱子游戲源代碼,含地圖編輯器,雙緩存版,通過游戲你可了解一些實用的VC++編程知識,推箱子游戲比較經典,有必要參看一下代碼。部分代碼需要VisualStudio編譯環境。

代碼片段和文件信息
//?BOX_Step1.cpp?:?Defines?the?class?behaviors?for?the?application.
//?Download?by?http://www.NewXing.com
#include?“stdafx.h“
#include?“BOX_Step1.h“
#include?“MainFrm.h“
#include?“BOX_Step1Doc.h“
#include?“BOX_Step1View.h“
#include?“SkinMagicLib.h“
#pragma?comment(lib?“SkinMagicTrial.lib“)
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CBOX_Step1App
BEGIN_MESSAGE_MAP(CBOX_Step1App?CWinApp)
//{{AFX_MSG_MAP(CBOX_Step1App)
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()
/////////////////////////////////////////////////////////////////////////////
//?CBOX_Step1App?construction
CBOX_Step1App::CBOX_Step1App()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CBOX_Step1App?object
CBOX_Step1App?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CBOX_Step1App?initialization
BOOL?CBOX_Step1App::InitInstance()
{
VERIFY(1?==InitSkinMagicLib(AfxGetInstanceHandle()?NULL??NULL?NULL?));//
LoadSkinFile(“corona.smf“);
SetDialogSkin(“Dialog“);
// VERIFY(1?==LoadSkinFromResource(NULL(LPCTSTR)IDR_SKINMAGIC1?“SKINMAGIC“));//本步驟需要添加
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(CBOX_Step1Doc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CBOX_Step1View));
AddDocTemplate(pDocTemplate);
//?Pa
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????542584??2011-06-21?00:48??BOX_Step1.aps
?????文件???????2802??2011-06-21?00:48??BOX_Step1.clw
?????文件???????4876??2013-12-02?06:12??BOX_Step1.cpp
?????文件????????643??2011-05-29?23:05??BOX_Step1.dep
?????文件???????5582??2011-06-21?00:49??BOX_Step1.dsp
?????文件????????541??2011-05-29?23:05??BOX_Step1.dsw
?????文件????2666571??2011-06-14?13:48??BOX_Step1.exe
?????文件???????1427??2013-12-02?06:12??BOX_Step1.h
?????文件???????6142??2011-06-21?00:49??BOX_Step1.mak
?????文件??????12577??2011-06-21?00:48??BOX_Step1.rc
?????文件????????883??2011-06-21?00:42??BOX_Step1.sln
?????文件???????8704??2011-06-21?00:43??BOX_Step1.suo
?????文件???????9415??2011-06-21?00:42??BOX_Step1.vcproj
?????文件???????1419??2011-06-21?00:43??BOX_Step1.vcproj.孤舟一夜-PC.孤舟一夜.user
?????文件???????6257??2013-12-02?06:12??BOX_Step1Doc.cpp
?????文件???????2287??2013-12-02?06:12??BOX_Step1Doc.h
?????文件???????9471??2013-12-02?06:12??BOX_Step1View.cpp
?????文件???????2310??2013-12-02?06:12??BOX_Step1View.h
?????文件????2703440??2011-06-12?09:04??BoxGame.exe
?????文件??????72225??2011-06-05?14:59??corona.smf
?????文件??????47277??2004-08-06?14:33??futuraIII.smf
?????文件???????5354??2013-12-02?06:12??MainFrm.cpp
?????文件???????1928??2013-12-02?06:12??MainFrm.h
?????文件????????692??2011-06-07?16:15??Map1.Map
?????文件????????548??2011-06-05?23:05??Map2.Map
?????文件???????2100??2011-06-05?23:06??Map3.Map
?????文件???????8276??2011-06-05?23:08??Map4.Map
?????文件????????692??2011-06-07?16:26??Map5.Map
?????文件???????2196??2011-06-07?16:04??Map6.Map
?????文件???????2132??2011-06-07?16:04??Map7.Map
............此處省略42個文件信息
評論
共有 條評論