資源簡(jiǎn)介
中國(guó)象棋對(duì)弈(MFC單機(jī)版),能實(shí)現(xiàn)兩個(gè)玩家輪流行棋,支持悔一步棋,有倒計(jì)時(shí)60s功能,支持棋語(yǔ)顯示,有聲音音效,有作者郵箱,可以在線請(qǐng)教,歡迎與作者一起交流.

代碼片段和文件信息
//?chess.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“chess.h“
#include?“MainFrm.h“
#include?“chessDoc.h“
#include?“chessView.h“
#include?“Managers.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CChessApp
BEGIN_MESSAGE_MAP(CChessApp?CWinApp)
//{{AFX_MSG_MAP(CChessApp)
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)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CChessApp?construction
CChessApp::CChessApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CChessApp?object
CChessApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CChessApp?initialization
BOOL?CChessApp::InitInstance()
{
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(CChessDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CChessView));
AddDocTemplate(pDocTemplate);
//?Parse?command?line?for?standard?shell?commands?DDE?file?open
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?Dispatch?commands?specified?on?the?command?line
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
m_pMainWnd->SetWindowText(“中國(guó)象棋對(duì)弈(單機(jī)版)“);
RECT?rc;//單文檔居中
????::GetWindowRect(?m_pMainWnd->m_
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????775292??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chess.aps
?????文件???????2259??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chess.clw
?????文件???????4519??2013-10-22?21:50??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chess.cpp
?????文件???????5087??2013-10-22?21:54??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chess.dsp
?????文件????????518??2013-09-16?15:13??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chess.dsw
?????文件???????1345??2013-09-16?15:11??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chess.h
?????文件?????254976??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chess.ncb
?????文件??????53760??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chess.opt
?????文件????????963??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chess.plg
?????文件???????9737??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chess.rc
?????文件???????1722??2013-09-16?15:11??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chessDoc.cpp
?????文件???????1464??2013-09-16?15:11??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chessDoc.h
?????文件??????13104??2013-10-22?21:53??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chessView.cpp
?????文件???????2454??2013-10-22?21:53??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\chessView.h
?????文件????1106000??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\chess.exe
?????文件?????558008??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\chess.ilk
?????文件??????28013??2013-10-22?22:04??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\chess.obj
?????文件????5630356??2013-10-22?22:04??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\chess.pch
?????文件?????648192??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\chess.pdb
?????文件?????738384??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\chess.res
?????文件??????14696??2013-10-22?22:04??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\chessDoc.obj
?????文件??????58468??2013-10-22?22:04??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\chessView.obj
?????文件???????3989??2013-10-22?22:04??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\hess.obj
?????文件??????15544??2013-10-22?22:04??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\MainFrm.obj
?????文件?????332172??2013-10-22?22:04??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\Managers.obj
?????文件?????108880??2013-10-22?22:04??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\StdAfx.obj
?????文件?????222208??2013-10-22?22:05??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\vc60.idb
?????文件?????380928??2013-10-22?22:04??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\vc60.pdb
?????文件??????20563??2013-10-22?22:04??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\Debug\WaveSound.obj
?????文件????????516??2013-09-17?15:26??中國(guó)象棋對(duì)弈(MFC單機(jī)版)\hess.cpp
............此處省略42個(gè)文件信息
評(píng)論
共有 條評(píng)論