資源簡(jiǎn)介
本資源實(shí)現(xiàn)的是一個(gè)游戲效果:動(dòng)畫,模擬跑酷的小游戲
資源中的MFC工程是由VS2010創(chuàng)建,因此請(qǐng)用VS2010或更高版本編譯運(yùn)行
由CSDN博主BlueCoder(黎小華)提供,你可以結(jié)合我的博文來(lái)理解學(xué)習(xí)^_^:
http://blog.csdn.net/crocodile__/article/details/17357533

代碼片段和文件信息
//?Animation.cpp?:?定義應(yīng)用程序的類行為。
//
#include?“stdafx.h“
#include?“afxwinappex.h“
#include?“afxdialogex.h“
#include?“Animation.h“
#include?“MainFrm.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CAnimationApp
BEGIN_MESSAGE_MAP(CAnimationApp?CWinAppEx)
ON_COMMAND(ID_APP_ABOUT?&CAnimationApp::OnAppAbout)
END_MESSAGE_MAP()
//?CAnimationApp?構(gòu)造
CAnimationApp::CAnimationApp()
{
m_bHiColorIcons?=?TRUE;
//?支持重新啟動(dòng)管理器
m_dwRestartManagerSupportFlags?=?AFX_RESTART_MANAGER_SUPPORT_RESTART;
#ifdef?_MANAGED
//?如果應(yīng)用程序是利用公共語(yǔ)言運(yùn)行時(shí)支持(/clr)構(gòu)建的,則:
//?????1)?必須有此附加設(shè)置,“重新啟動(dòng)管理器”支持才能正常工作。
//?????2)?在您的項(xiàng)目中,您必須按照生成順序向?System.Windows.Forms?添加引用。
System::Windows::Forms::Application::SetUnhandledExceptionMode(System::Windows::Forms::UnhandledExceptionMode::ThrowException);
#endif
//?TODO:?將以下應(yīng)用程序?ID?字符串替換為唯一的?ID?字符串;建議的字符串格式
//為?CompanyName.ProductName.SubProduct.VersionInformation
SetAppID(_T(“Animation.AppID.NoVersion“));
//?TODO:?在此處添加構(gòu)造代碼,
//?將所有重要的初始化放置在?InitInstance?中
}
//?唯一的一個(gè)?CAnimationApp?對(duì)象
CAnimationApp?theApp;
//?CAnimationApp?初始化
BOOL?CAnimationApp::InitInstance()
{
//?如果一個(gè)運(yùn)行在?Windows?XP?上的應(yīng)用程序清單指定要
//?使用?ComCtl32.dll?版本?6?或更高版本來(lái)啟用可視化方式,
//則需要?InitCommonControlsEx()。否則,將無(wú)法創(chuàng)建窗口。
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?將它設(shè)置為包括所有要在應(yīng)用程序中使用的
//?公共控件類。
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinAppEx::InitInstance();
//?初始化?OLE?庫(kù)
if?(!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return?FALSE;
}
AfxEnableControlContainer();
EnableTaskbarInteraction(FALSE);
//?使用?RichEdit?控件需要??AfxInitRichEdit2()
//?AfxInitRichEdit2();
//?標(biāo)準(zhǔn)初始化
//?如果未使用這些功能并希望減小
//?最終可執(zhí)行文件的大小,則應(yīng)移除下列
//?不需要的特定初始化例程
//?更改用于存儲(chǔ)設(shè)置的注冊(cè)表項(xiàng)
//?TODO:?應(yīng)適當(dāng)修改該字符串,
//?例如修改為公司或組織名
SetRegistryKey(_T(“應(yīng)用程序向?qū)傻谋镜貞?yīng)用程序“));
InitContextMenuManager();
InitKeyboardManager();
InitTooltipManager();
CMFCToolTipInfo?ttParams;
ttParams.m_bVislManagerTheme?=?TRUE;
theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL
RUNTIME_CLASS(CMFCToolTipCtrl)?&ttParams);
//?若要?jiǎng)?chuàng)建主窗口,此代碼將創(chuàng)建新的框架窗口
//?對(duì)象,然后將其設(shè)置為應(yīng)用程序的主窗口對(duì)象
CMainframe*?pframe?=?new?CMainframe;
if?(!pframe)
return?FALSE;
m_pMainWnd?=?pframe;
//?創(chuàng)建并加載框架及其資源
pframe->Loadframe(IDR_MAINframe
WS_OVERLAPPEDWINDOW?|?FWS_ADDTOtitle?NULL
NULL);
//?唯一的一個(gè)窗口已初始化,因此顯示它并對(duì)其進(jìn)行更新
pframe->ShowWindow(SW_SHOW);
pframe->UpdateWindow();
//?僅當(dāng)具有后綴時(shí)才調(diào)用?DragAcceptFiles
//??在?SDI?應(yīng)用程序中,這應(yīng)在?ProcessShellCommand?之后發(fā)生
return?TRUE;
}
int?CAnimationApp::ExitInstance()
{
//TODO:?處理可能已添加的附加資源
AfxOleTerm(FALSE);
CleanState(L“WorkSpace“);
return?CWinAppEx::ExitInstance();
}
//?CAnimationApp?消息處理程序
//?用于應(yīng)用程序“關(guān)于”菜單項(xiàng)的?CAboutDlg?對(duì)話框
class?CAboutDlg?:?public?CDialogEx
{
public:
CAboutDlg();
//?對(duì)話框數(shù)據(jù)
enum?{?IDD?=?IDD_ABOUTBOX?};
protected:
virtual?void?DoDataExchange(CDa
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-12-16?21:39??Animation\
?????目錄???????????0??2013-12-16?21:17??Animation\Animation\
?????文件?????????894??2013-11-26?15:42??Animation\Animation.sln
?????文件???????22528??2013-12-16?21:39??Animation\Animation.suo
?????文件????????4289??2013-11-26?15:48??Animation\Animation\Animation.cpp
?????文件???????54784??2013-12-09?18:33??Animation\Animation\Animation.exe
?????文件?????????682??2013-11-26?15:42??Animation\Animation\Animation.h
?????文件???????17736??2013-11-26?15:48??Animation\Animation\Animation.rc
?????文件????????6171??2013-11-30?21:15??Animation\Animation\Animation.vcxproj
?????文件????????2536??2013-11-30?20:41??Animation\Animation\Animation.vcxproj.filters
?????文件?????????143??2013-11-26?15:42??Animation\Animation\Animation.vcxproj.user
?????文件????????1709??2013-12-09?18:33??Animation\Animation\Character.cpp
?????文件?????????908??2013-12-09?17:03??Animation\Animation\Character.h
?????文件????????2371??2013-12-16?20:11??Animation\Animation\ChildView.cpp
?????文件?????????740??2013-12-08?22:29??Animation\Animation\ChildView.h
?????文件????????5461??2013-11-26?17:46??Animation\Animation\MainFrm.cpp
?????文件????????1039??2013-11-26?15:42??Animation\Animation\MainFrm.h
?????文件????????3059??2013-11-26?15:42??Animation\Animation\ReadMe.txt
?????目錄???????????0??2013-12-09?18:08??Animation\Animation\res\
?????文件????????3156??2013-11-26?15:48??Animation\Animation\resource.h
?????文件???????18991??2011-09-29?15:21??Animation\Animation\res\1.png
?????文件???????15623??2011-09-29?15:21??Animation\Animation\res\10.png
?????文件???????14585??2011-09-29?15:21??Animation\Animation\res\11.png
?????文件???????13023??2011-09-29?15:21??Animation\Animation\res\12.png
?????文件???????12012??2011-09-29?15:21??Animation\Animation\res\13.png
?????文件???????12601??2011-09-29?15:21??Animation\Animation\res\14.png
?????文件???????15580??2011-09-29?15:21??Animation\Animation\res\15.png
?????文件???????17982??2011-09-29?15:21??Animation\Animation\res\16.png
?????文件???????16857??2011-09-29?15:21??Animation\Animation\res\2.png
?????文件???????13833??2011-09-29?15:21??Animation\Animation\res\3.png
?????文件???????11411??2011-09-29?15:21??Animation\Animation\res\4.png
............此處省略15個(gè)文件信息
評(píng)論
共有 條評(píng)論