資源簡介
C++五子棋游戲的完美程序 在VC下可完美運(yùn)行 另有課程設(shè)計(jì)的實(shí)驗(yàn)報(bào)告 名字為“C++五子棋實(shí)驗(yàn)報(bào)告最終版”配套報(bào)告
代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“五子棋.h“
#include?“MainFrm.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMainframe
IMPLEMENT_DYNCREATE(CMainframe?CframeWnd)
BEGIN_MESSAGE_MAP(CMainframe?CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
ON_WM_CREATE()
ON_COMMAND(IDM_LEVEL_ESAY?OnLevelEsay)
ON_COMMAND(IDM_LEVEL_HARD?OnLevelHard)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static?UINT?indicators[]?=
{
ID_SEPARATOR???????????//?status?line?indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?construction/destruction
CMainframe::CMainframe()
{
//?TODO:?add?member?initialization?code?here
????m_IsMenuCheck=TRUE;
m_Level=1;
}
CMainframe::~CMainframe()
{
}
int?CMainframe::OnCreate(LPCREATESTRUCT?lpCreateStruct)
{
if?(CframeWnd::OnCreate(lpCreateStruct)?==?-1)
return?-1;
/*
if?(!m_wndToolBar.CreateEx(this?TBstyle_FLAT?WS_CHILD?|?WS_VISIBLE?|?CBRS_TOP
|?CBRS_GRIPPER?|?CBRS_TOOLTIPS?|?CBRS_FLYBY?|?CBRS_SIZE_DYNAMIC)?||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed?to?create?toolbar\n“);
return?-1;??????//?fail?to?create
}
if?(!m_wndStatusBar.Create(this)?||
!m_wndStatusBar.SetIndicators(indicators
??sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed?to?create?status?bar\n“);
return?-1;??????//?fail?to?create
}
*/
//?TODO:?Delete?these?three?lines?if?you?don‘t?want?the?toolbar?to
//??be?dockable
// m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
// EnableDocking(CBRS_ALIGN_ANY);
// DockControlBar(&m_wndToolBar);
return?0;
}
BOOL?CMainframe::PreCreateWindow(CREATESTRUCT&?cs)
{
if(?!CframeWnd::PreCreateWindow(cs)?)
return?FALSE;
//?TODO:?Modify?the?Window?class?or?styles?here?by?modifying
//??the?CREATESTRUCT?cs
????cs.cx=800;
cs.cy=590;
cs.x=240;
cs.y=75;
return?TRUE;
}
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?diagnostics
#ifdef?_DEBUG
void?CMainframe::AssertValid()?const
{
CframeWnd::AssertValid();
}
void?CMainframe::Dump(CDumpContext&?dc)?const
{
CframeWnd::Dump(dc);
}
#endif?//_DEBUG
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?message?handlers
void?CMainframe::OnLevelEsay()?
{
//?TODO:?Add?your?command?handler?code?here
if(FALSE==m_IsMenuCheck)
{
??????GetMenu()->GetSubMenu(1)->CheckMenuItem(0MF_BYPOSITION?|?MF_CHECKED);
??GetMenu()->GetSubMenu(1)->CheckMenuItem(1MF_BYPOSITION?|?MF_UNCHECKED);
??m_IsMenuCheck=TRUE;
}
//電腦等級(jí)
????m_Level=1;
}
void?CMainframe::OnLevelHard()?
{
//?TODO:?Add?your?command?handler?code?here
???if(TRUE==m_IsMenuCheck)
???{
??????GetMe
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-01-04?19:00??程序\
?????目錄???????????0??2011-01-04?19:00??程序\Debug\
?????文件???????19992??2010-12-27?09:21??程序\Debug\MainFrm.obj
?????文件????????4105??2010-12-27?09:21??程序\Debug\MainFrm.sbr
?????文件??????105412??2010-12-26?12:23??程序\Debug\StdAfx.obj
?????文件?????1369851??2010-12-26?12:23??程序\Debug\StdAfx.sbr
?????文件??????380928??2010-12-28?10:48??程序\Debug\vc60.pdb
?????文件?????7987293??2010-12-28?12:47??程序\Debug\五子棋.exe
?????文件???????26861??2010-12-26?12:23??程序\Debug\五子棋.obj
?????文件??????500736??2010-12-28?12:47??程序\Debug\五子棋.pdb
?????文件?????6519748??2010-12-28?17:11??程序\Debug\五子棋.res
?????文件???????63950??2010-12-26?12:23??程序\Debug\五子棋.sbr
?????文件????????2560??2010-12-26?11:43??程序\Debug\五子棋.suo
?????文件???????14234??2010-12-26?12:23??程序\Debug\五子棋Doc.obj
?????文件????????3096??2010-12-26?12:23??程序\Debug\五子棋Doc.sbr
?????文件???????99909??2010-12-28?11:36??程序\Debug\五子棋View.obj
?????文件???????81515??2010-12-28?11:36??程序\Debug\五子棋View.sbr
?????文件????????3215??2010-12-27?09:21??程序\MainFrm.cpp
?????文件????????1535??2008-12-04?13:46??程序\MainFrm.h
?????文件????????4283??2008-12-04?10:41??程序\ReadMe.txt
?????目錄???????????0??2011-01-04?19:00??程序\res\
?????文件????????1966??2010-05-05?15:43??程序\resource.h
?????文件?????????160??2008-12-07?16:47??程序\resource.hm
?????文件???????39980??2010-04-26?21:12??程序\res\BOO.wav
?????文件???????88998??2010-04-26?21:13??程序\res\CHEERS1.wav
?????文件????????6520??2008-12-07?17:31??程序\res\eight.wav
?????文件????????9818??2008-12-07?17:31??程序\res\five.wav
?????文件????????8688??2008-12-07?17:31??程序\res\four.wav
?????文件??????153162??2008-12-06?22:02??程序\res\g.wav
?????文件??????153690??2008-12-06?21:56??程序\res\gdf.wav
?????文件??????528010??2010-12-26?13:41??程序\res\KCM_105.mp3
............此處省略31個(gè)文件信息
評(píng)論
共有 條評(píng)論