資源簡(jiǎn)介
MFC下的游戲手柄編程,編譯環(huán)境為VS2010,編譯通過!

代碼片段和文件信息
//?Joystic.cpp?:?定義應(yīng)用程序的類行為。
//
#include?“stdafx.h“
#include?“Joystic.h“
#include?“JoysticDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CJoysticApp
BEGIN_MESSAGE_MAP(CJoysticApp?CWinApp)
ON_COMMAND(ID_HELP?&CWinApp::onhelp)
END_MESSAGE_MAP()
//?CJoysticApp?構(gòu)造
CJoysticApp::CJoysticApp()
{
//?支持重新啟動(dòng)管理器
m_dwRestartManagerSupportFlags?=?AFX_RESTART_MANAGER_SUPPORT_RESTART;
//?TODO:?在此處添加構(gòu)造代碼,
//?將所有重要的初始化放置在?InitInstance?中
}
//?唯一的一個(gè)?CJoysticApp?對(duì)象
CJoysticApp?theApp;
//?CJoysticApp?初始化
BOOL?CJoysticApp::InitInstance()
{
//?如果一個(gè)運(yùn)行在?Windows?XP?上的應(yīng)用程序清單指定要
//?使用?ComCtl32.dll?版本?6?或更高版本來啟用可視化方式,
//則需要?InitCommonControlsEx()。否則,將無法創(chuàng)建窗口。
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?將它設(shè)置為包括所有要在應(yīng)用程序中使用的
//?公共控件類。
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
AfxEnableControlContainer();
//?創(chuàng)建?shell?管理器,以防對(duì)話框包含
//?任何?shell?樹視圖控件或?shell?列表視圖控件。
CShellManager?*pShellManager?=?new?CShellManager;
//?標(biāo)準(zhǔn)初始化
//?如果未使用這些功能并希望減小
//?最終可執(zhí)行文件的大小,則應(yīng)移除下列
//?不需要的特定初始化例程
//?更改用于存儲(chǔ)設(shè)置的注冊(cè)表項(xiàng)
//?TODO:?應(yīng)適當(dāng)修改該字符串,
//?例如修改為公司或組織名
SetRegistryKey(_T(“應(yīng)用程序向?qū)傻谋镜貞?yīng)用程序“));
CJoysticDlg?dlg;
m_pMainWnd?=?&dlg;
INT_PTR?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?在此放置處理何時(shí)用
//??“確定”來關(guān)閉對(duì)話框的代碼
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?在此放置處理何時(shí)用
//??“取消”來關(guān)閉對(duì)話框的代碼
}
//?刪除上面創(chuàng)建的?shell?管理器。
if?(pShellManager?!=?NULL)
{
delete?pShellManager;
}
//?由于對(duì)話框已關(guān)閉,所以將返回?FALSE?以便退出應(yīng)用程序,
//??而不是啟動(dòng)應(yīng)用程序的消息泵。
return?FALSE;
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-06-11?21:56??Joystic\
?????目錄???????????0??2012-06-11?19:54??Joystic\Debug\
?????文件??????171520??2012-06-11?21:49??Joystic\Debug\Joystic.exe
?????文件?????1477504??2012-06-11?21:49??Joystic\Debug\Joystic.ilk
?????文件?????5262336??2012-06-11?21:49??Joystic\Debug\Joystic.pdb
?????文件?????4618090??2007-10-22?03:21??Joystic\DxErr8.lib
?????文件??????570238??2007-10-22?03:21??Joystic\dxguid.lib
?????目錄???????????0??2012-06-11?21:56??Joystic\Joystic\
?????文件??????105860??2012-06-11?21:06??Joystic\Joystic\Joystic.aps
?????文件????????2006??2012-06-10?19:43??Joystic\Joystic\Joystic.cpp
?????文件?????????448??2012-06-10?19:43??Joystic\Joystic\Joystic.h
?????文件???????10298??2012-06-11?21:06??Joystic\Joystic\Joystic.rc
?????文件????????6393??2012-06-11?20:29??Joystic\Joystic\Joystic.vcxproj
?????文件????????2385??2012-06-10?23:51??Joystic\Joystic\Joystic.vcxproj.filters
?????文件?????????143??2012-06-10?19:43??Joystic\Joystic\Joystic.vcxproj.user
?????文件????????5406??2012-06-11?21:49??Joystic\Joystic\JoysticDlg.cpp
?????文件?????????646??2012-06-11?20:03??Joystic\Joystic\JoysticDlg.h
?????文件????????5206??2012-06-11?20:47??Joystic\Joystic\Joystick.cpp
?????文件?????????903??2012-06-10?19:49??Joystic\Joystic\Joystick.h
?????文件????????3141??2012-06-10?19:43??Joystic\Joystic\ReadMe.txt
?????目錄???????????0??2012-06-10?19:43??Joystic\Joystic\res\
?????文件???????67777??2009-08-31?02:31??Joystic\Joystic\res\Joystic.ico
?????文件?????????670??2012-06-10?19:43??Joystic\Joystic\res\Joystic.rc2
?????文件????????1452??2012-06-11?20:22??Joystic\Joystic\resource.h
?????文件?????????140??2012-06-10?19:43??Joystic\Joystic\stdafx.cpp
?????文件????????1632??2012-06-10?19:43??Joystic\Joystic\stdafx.h
?????文件?????????234??2012-06-10?19:43??Joystic\Joystic\targetver.h
?????文件?????????888??2012-06-10?19:43??Joystic\Joystic.sln
?????文件???????20480??2012-06-11?21:53??Joystic\Joystic.suo
評(píng)論
共有 條評(píng)論