資源簡介
自己用VC寫的黑白棋游戲小程序,跟大家分享分享。
代碼片段和文件信息
//?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()
//}}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
}
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;
???cs.dwExstyle=cs.dwExstyle|WS_EX_TOPMOST;?????//
???????cs.style=WS_SYSMENU|WS_OVERLAPPED|WS_MINIMIZEBOX;//;?
???????//設置窗口大小:250*140
??????cs.cx=300;
???????cs.cy=300;??
?
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
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???69861376??2010-11-14?22:46??黑白棋\ipch\黑白棋-7866a843\黑白棋-b59c68ef.ipch
?????文件???????2476??2009-05-10?15:35??黑白棋\MainFrm.cpp
?????文件???????1437??2009-05-10?15:41??黑白棋\MainFrm.h
?????文件???????4283??2009-05-10?15:03??黑白棋\ReadMe.txt
?????文件?????562554??2009-05-08?19:42??黑白棋\res\beijing.bmp
?????文件??????10552??2009-05-08?19:38??黑白棋\res\beijing.jpg
?????文件????????310??2009-05-06?22:36??黑白棋\res\bitmap1.bmp
?????文件???????1438??2001-11-05?17:11??黑白棋\res\black.bmp
?????文件????????626??2009-05-10?15:58??黑白棋\res\cur00001.cur
?????文件????????626??2009-05-10?15:56??黑白棋\res\cursor3.cur
?????文件???????3630??2009-05-10?16:00??黑白棋\res\ico00001.ico
?????文件???????1078??2009-05-04?19:08??黑白棋\res\icon1.ico
????..A.SH.??????8704??2010-05-22?22:31??黑白棋\res\Thumbs.db
?????文件????????238??2009-05-10?17:46??黑白棋\res\Toolbar.bmp
?????文件???????1438??2001-11-15?18:17??黑白棋\res\white.bmp
?????文件???????1078??2009-05-10?15:03??黑白棋\res\黑白棋.ico
?????文件????????398??2009-05-10?15:03??黑白棋\res\黑白棋.rc2
?????文件???????1078??2009-05-10?15:03??黑白棋\res\黑白棋Doc.ico
?????文件????????803??2009-05-10?15:13??黑白棋\Resource.h
?????文件????????208??2009-05-10?15:03??黑白棋\StdAfx.cpp
?????文件???????1054??2009-05-10?15:03??黑白棋\StdAfx.h
?????文件?????601016??2009-05-18?10:00??黑白棋\黑白棋.aps
?????文件???????1941??2009-09-04?13:57??黑白棋\黑白棋.clw
?????文件???????4153??2009-05-10?15:03??黑白棋\黑白棋.cpp
?????文件???????4910??2009-05-10?16:09??黑白棋\黑白棋.dsp
?????文件????????747??2009-06-13?16:53??黑白棋\黑白棋.dsw
?????文件???????1318??2009-05-10?15:03??黑白棋\黑白棋.h
?????文件??????91136??2009-09-04?14:41??黑白棋\黑白棋.ncb
?????文件??????50688??2009-09-04?14:41??黑白棋\黑白棋.opt
?????文件????????725??2009-05-18?17:36??黑白棋\黑白棋.plg
............此處省略18個文件信息
評論
共有 條評論