資源簡介
windows sdk 象棋windows sdk 象棋windows sdk 象棋windows sdk 象棋

代碼片段和文件信息
//?Mantis.cpp?:?Defines?the?entry?point?for?the?application.
//
#include?“Windows.h“
#include?“resource.h“
#include?“MantisChessDef.h“
#include?“MantisChessDraw.h“
#include?“MantisChessStd.h“
#include?“MantisChessThink.h“
#define?MAX_LOADSTRING?100
//?Global?Variables:
HINSTANCE?hInst; //?current?instance
TCHAR?sztitle[MAX_LOADSTRING]; //?The?title?bar?text
TCHAR?szWindowClass[MAX_LOADSTRING]; //?The?title?bar?text
//?Foward?declarations?of?functions?included?in?this?code?module:
ATOM MyRegisterClass(HINSTANCE?hInstance);
BOOL InitInstance(HINSTANCE?int);
LRESULT?CALLBACK WndProc(HWND?UINT?WPARAM?LPARAM);
LRESULT?CALLBACK About(HWND?UINT?WPARAM?LPARAM);
//----------------------------
void?OnCreate(HWND?hWnd);
void?Reset();
void?ShowRect(HDC?hdcLPRECT?prect);
void?ShowPoint(HDC?hdcPOINT?point);
void?Think(HWND?hWnd);
BOOL?Go(HWND?hWndint?manPOINT?targetpoint);
void?onmousemove(POINT?point);
void?OnLButtonDown(HWND?hWndPOINT?point);
BOOL?FaceToPoint(POINT?&point);
//--------------------------------------
static??POINT?m_pointChessman[32];
static??int?m_iChessmanMap[11][12];
static??int?m_iSide;
static??HCURSOR?m_hCurCantGo;
static??HCURSOR?m_hCurHand;
static??HCURSOR?m_hCurThinking;
static? HICON?m_hIconChessman[14];
static? HICON?m_hIconBox;
static? HICON?m_hIconselect;
static? HDC?m_hdcChessboard;
static? HBITMAP?m_hbmpChessboard;
static? POINT?m_pointBoxFrom;
static? POINT?m_pointBoxTo;
static? int?m_iChessmanSelect;
static? int?m_iComputerSide;
static??BOOL?m_bEndGame;
//--------------------------------------
int?APIENTRY?WinMain(HINSTANCE?hInstance
?????????????????????HINSTANCE?hPrevInstance
?????????????????????LPSTR?????lpCmdLine
?????????????????????int???????nCmdShow)
{
? //?TODO:?Place?code?here.
MSG?msg;
//?Initialize?global?strings
LoadString(hInstance?IDS_APP_title?sztitle?MAX_LOADSTRING);
LoadString(hInstance?IDC_MANTIS?szWindowClass?MAX_LOADSTRING);
MyRegisterClass(hInstance);
//?Perform?application?initialization:
if?(!InitInstance?(hInstance?nCmdShow))?
{
return?FALSE;
}
//?Main?message?loop:
while?(GetMessage(&msg?NULL?0?0))?
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return?msg.wParam;
}
//
//??FUNCTION:?MyRegisterClass()
//
//??PURPOSE:?Registers?the?window?class.
//
//??COMMENTS:
//
//????This?function?and?its?usage?is?only?necessary?if?you?want?this?code
//????to?be?compatible?with?Win32?systems?prior?to?the?‘RegisterClassEx‘
//????function?that?was?added?to?Windows?95.?It?is?important?to?call?this?function
//????so?that?the?application?will?get?‘well?formed‘?small?icons?associated
//????with?it.
//
ATOM?MyRegisterClass(HINSTANCE?hInstance)
{
WNDCLASSEX?wcex;
wcex.cbSize?=?sizeof(WNDCLASSEX);?
wcex.style =?CS_HREDRAW?|?CS_VREDRAW;
wcex.lpfnWndProc =?(WNDPROC)WndProc;
wcex.cbClsExtra =?0;
wcex.cbWndExtra =?0;
wcex
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2916??2004-10-04?21:33??9526343\9526343\Cn700.com.txt
????..AD...?????????0??2001-11-14?17:38??9526343\9526343\Debug
?????文件??????14441??2001-11-14?17:23??9526343\9526343\Mantis.cpp
?????文件???????6217??2001-11-14?17:37??9526343\9526343\Mantis.dsp
?????文件????????535??2001-11-14?14:44??9526343\9526343\Mantis.dsw
?????文件????????326??2001-11-14?13:39??9526343\9526343\Mantis.h
?????文件???????5243??2001-11-14?17:36??9526343\9526343\Mantis.rc
?????文件???????1852??2001-11-14?17:06??9526343\9526343\MantisChessDef.h
?????文件???????4440??2001-11-14?17:06??9526343\9526343\MantisChessDraw.cpp
?????文件????????257??2001-11-14?14:17??9526343\9526343\MantisChessDraw.h
?????文件???????7004??2001-11-14?17:22??9526343\9526343\MantisChessStd.cpp
?????文件????????218??2001-11-14?17:22??9526343\9526343\MantisChessStd.h
?????文件??????23988??2001-11-14?17:31??9526343\9526343\MantisChessThink.cpp
?????文件????????124??2001-11-14?15:45??9526343\9526343\MantisChessThink.h
?????文件????????223??2004-10-04?20:06??9526343\9526343\readme.htm
?????文件???????2469??2004-10-04?22:16??9526343\9526343\readme.txt
????..AD...?????????0??2001-11-14?17:38??9526343\9526343\Release
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\BLACK_B.ico
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\BLACK_J.ico
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\BLACK_K.ico
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\BLACK_M.ico
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\BLACK_P.ico
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\BLACK_S.ico
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\BLACK_X.ico
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\box1.ico
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\cantgo.cur
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\hand.cur
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\hand1.cur
?????文件????????766??2001-11-14?13:43??9526343\9526343\res\icon1.ico
?????文件???????1078??2001-11-14?17:36??9526343\9526343\res\Mantis.ico
............此處省略16個文件信息
評論
共有 條評論