VC黑白棋小游戏


自己用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
“);
return -1;      // fail to create
}

if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators
  sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed to create status bar
“);
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  黑白棋
eseijing.bmp

     文件      10552  2009-05-08 19:38  黑白棋
eseijing.jpg

     文件        310  2009-05-06 22:36  黑白棋
esitmap1.bmp

     文件       1438  2001-11-05 17:11  黑白棋
eslack.bmp

     文件        626  2009-05-10 15:58  黑白棋
escur00001.cur

     文件        626  2009-05-10 15:56  黑白棋
escursor3.cur

     文件       3630  2009-05-10 16:00  黑白棋
esico00001.ico

     文件       1078  2009-05-04 19:08  黑白棋
esicon1.ico

    ..A.SH.      8704  2010-05-22 22:31  黑白棋
esThumbs.db

     文件        238  2009-05-10 17:46  黑白棋
esToolbar.bmp

     文件       1438  2001-11-15 18:17  黑白棋
eswhite.bmp

     文件       1078  2009-05-10 15:03  黑白棋
es黑白棋.ico

     文件        398  2009-05-10 15:03  黑白棋
es黑白棋.rc2

     文件       1078  2009-05-10 15:03  黑白棋
es黑白棋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个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)