資源簡介
24點游戲程序設計 24點代碼 24點游戲 24點WIN32代碼 24點MFC
代碼片段和文件信息
//?GAME21.cpp?:?定義應用程序的入口點。
//
#include?“stdafx.h“
#include?“GAME211.h“
#define?MAX_LOADSTRING?100
//?全局變量:
HINSTANCE?hInst; //?當前實例
TCHAR?sztitle[MAX_LOADSTRING]; //?標題欄文本
TCHAR?szWindowClass[MAX_LOADSTRING]; //?主窗口類名
HBITMAP?bitmaps[52];
HBITMAP?hBmpMain;
HBITMAP?hBmpMan;
HDC?hBMDC;
static?int?i;
static?int?j;
static?int?k;
static?int?lm;
//?此代碼模塊中包含的函數的前向聲明:
ATOM MyRegisterClass(HINSTANCE?hInstance);
BOOL InitInstance(HINSTANCE?int);
LRESULT?CALLBACK WndProc(HWND?UINT?WPARAM?LPARAM);
INT_PTR?CALLBACK About(HWND?UINT?WPARAM?LPARAM);
int?APIENTRY?_tWinMain(HINSTANCE?hInstance
?????????????????????HINSTANCE?hPrevInstance
?????????????????????LPTSTR????lpCmdLine
?????????????????????int???????nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
? //?TODO:?在此放置代碼。
for(WORD?id=IDB_BITMAP1;?id<=IDB_BITMAP52;id++?)
{
bitmaps[id-IDB_BITMAP1]?=?LoadBitmap(hInstanceMAKEINTRESOURCE(id));
}
hBmpMain?=?LoadBitmap(hInstanceMAKEINTRESOURCE(IDB_BMP_MAIN));
//MSG?msg;
// HACCEL?hAccelTable;
//?初始化全局字符串
//LoadString(hInstance?IDS_APP_title?sztitle?MAX_LOADSTRING);
//LoadString(hInstance?IDC_GAME211?szWindowClass?MAX_LOADSTRING);
hInst?=?GetModuleHandle(NULL);
DialogBoxParam(hInstMAKEINTRESOURCE(DLG_MAIN)NULL(DLGPROC)WndProcNULL);
ExitProcess(NULL);
}
//
//??函數:?MyRegisterClass()
//
//??目的:?注冊窗口類。
//
//??注釋:
//
//????僅當希望
//????此代碼與添加到?Windows?95?中的“RegisterClassEx”
//????函數之前的?Win32?系統兼容時,才需要此函數及其用法。調用此函數十分重要,
//????這樣應用程序就可以獲得關聯的
//????“格式正確的”小圖標。
//
//ATOM?MyRegisterClass(HINSTANCE?hInstance)
//{
// WNDCLASSEX?wcex;
//
// wcex.cbSize?=?sizeof(WNDCLASSEX);
//
// wcex.style =?CS_HREDRAW?|?CS_VREDRAW;
// wcex.lpfnWndProc =?WndProc;
// wcex.cbClsExtra =?0;
// wcex.cbWndExtra =?0;
// wcex.hInstance =?hInstance;
// wcex.hIcon =?LoadIcon(hInstance?MAKEINTRESOURCE(IDI_GAME21));
// wcex.hCursor =?LoadCursor(NULL?IDC_ARROW);
// wcex.hbrBackground =?(HBRUSH)(COLOR_WINDOW+1);
// wcex.lpszMenuName =?MAKEINTRESOURCE(IDC_GAME21);
// wcex.lpszClassName =?szWindowClass;
// wcex.hIconSm =?LoadIcon(wcex.hInstance?MAKEINTRESOURCE(IDI_SMALL));
//
// return?RegisterClassEx(&wcex);
//}
void?OnDrawBmp(HWND?hDesWndHBITMAP?hBmp)
{
RECT?rect;
HDC?hdchMmpdc;
BITMAP?bm;
int?cxClientcyClientbmWidthbmHeight;
GetWindowRect(hDesWnd&rect);
cxClient?=?rect.right?-?rect.left;
cyClient?=?rect.bottom?-?rect.top;
hMmpdc?=?CreateCompatibleDC(hdc?=?GetDC(hDesWnd));
Selectobject(hMmpdchBmp);
::Getobject(?hBmp?sizeof(?bm?)?&bm?);
bmWidth?=?bm.bmWidth;
bmHeight?=?bm.bmHeight;
StretchBlt(hdc00cxClientcyClienthMmpdc00bmWidthbmHeightMERGECOPY);
ReleaseDC(hDesWndhdc);
DeleteDC(hMmpdc);
//Deleteobject(hBmp);
}
bool?calc(std::wstring?strResult)
{
std::wstring?result;
std::vector?strack;
return?true;
}
void?OnDeal(HWND?hWnd)
{
H
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????6729??2014-04-22?02:51??24dian\程序\GAME211.vcxproj.filters
?????文件????????143??2014-04-21?22:04??24dian\程序\GAME211.vcxproj.user
?????文件???????2333??2014-04-21?22:04??24dian\程序\ReadMe.txt
?????文件???????8374??2014-04-22?13:16??24dian\程序\resource.h
?????文件??????23558??2009-08-31?02:31??24dian\程序\small.ico
?????文件????????212??2014-04-21?22:04??24dian\程序\stdafx.cpp
?????文件????????475??2014-04-22?16:22??24dian\程序\stdafx.h
?????文件????????238??2014-04-22?05:54??24dian\程序\targetver.h
?????文件???????4734??2014-04-22?16:30??24dian\程序\Debug\cl.command.1.tlog
?????文件??????49932??2014-04-22?16:30??24dian\程序\Debug\CL.read.1.tlog
?????文件???????3836??2014-04-22?16:30??24dian\程序\Debug\CL.write.1.tlog
?????文件?????????10??2014-04-22?23:37??24dian\程序\Debug\game.in
?????文件?????????21??2014-04-22?23:37??24dian\程序\Debug\game.out
?????文件????5364224??2014-05-12?08:26??24dian\程序\Debug\GAME211.exe
?????文件????????406??2014-04-21?22:10??24dian\程序\Debug\GAME211.exe.em
?????文件????????472??2014-04-22?14:09??24dian\程序\Debug\GAME211.exe.em
?????文件????????381??2014-04-22?16:30??24dian\程序\Debug\GAME211.exe.intermediate.manifest
?????文件?????????82??2014-04-22?16:30??24dian\程序\Debug\GAME211.lastbuildstate
?????文件???????2616??2014-04-22?16:30??24dian\程序\Debug\GAME211.log
?????文件?????115342??2014-04-22?16:30??24dian\程序\Debug\GAME211.obj
?????文件???12845056??2014-04-22?16:25??24dian\程序\Debug\GAME211.pch
?????文件????2935808??2014-05-12?08:26??24dian\程序\Debug\GAME211.pdb
?????文件????4302876??2014-04-22?14:09??24dian\程序\Debug\GAME211.res
?????文件????????713??2014-04-21?22:51??24dian\程序\Debug\GAME211.vcxprojResolveAssemblyReference.cache
?????文件??????????0??2014-04-21?22:07??24dian\程序\Debug\GAME211.write.1.tlog
?????文件????????204??2014-04-21?22:10??24dian\程序\Debug\GAME211_manifest.rc
?????文件?????277868??2014-04-22?16:25??24dian\程序\Debug\game24Calc.obj
?????文件??????????2??2014-04-22?16:30??24dian\程序\Debug\li
?????文件??????????2??2014-04-22?16:30??24dian\程序\Debug\li
?????文件??????????2??2014-04-22?16:30??24dian\程序\Debug\li
............此處省略285個文件信息
- 上一篇:基于QT5的簡化版黃金礦工
- 下一篇:c++操作ch340 發送串口給arduino
評論
共有 條評論