• 大小: 1.87MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-31
  • 语言: C/C++
  • 标签: MFC  扫雷  

资源简介

这是本人用mfc编写的程序,界面不太漂亮,但是基本功能都有!希望对大家有帮助!

资源截图

代码片段和文件信息

// 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(ID_START onstart)
//}}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;
// TODO: Modify the Window class or styles here by modifying
//  the CREATESTRUCT cs

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::onstart() 
{
// TODO: Add your command handler code here


}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      20305  2008-04-18 19:03  saolei\Debug\MainFrm.obj

     文件     105537  2008-04-18 19:03  saolei\Debug\StdAfx.obj

     文件     205824  2008-04-18 19:03  saolei\Debug\vc60.idb

     文件     372736  2008-04-18 19:03  saolei\Debug\vc60.pdb

     文件     131126  2008-04-18 19:03  saolei\Debug\扫雷.exe

     文件     328668  2008-04-18 19:03  saolei\Debug\扫雷.ilk

     文件      22574  2008-04-18 19:03  saolei\Debug\扫雷.obj

     文件    5578952  2008-04-18 19:03  saolei\Debug\扫雷.pch

     文件     500736  2008-04-18 19:03  saolei\Debug\扫雷.pdb

     文件      12788  2008-04-01 21:48  saolei\Debug\扫雷.res

     文件      14362  2008-04-18 19:03  saolei\Debug\扫雷Doc.obj

     文件      39696  2008-04-18 19:03  saolei\Debug\扫雷View.obj

     文件       2486  2008-04-01 21:12  saolei\MainFrm.cpp

     文件       1466  2008-04-01 21:08  saolei\MainFrm.h

     文件       4249  2008-04-01 17:35  saolei\ReadMe.txt

     文件       1078  2008-04-01 21:22  saolei\res\12.bmp

     文件       1270  2008-04-01 21:48  saolei\res\2.bmp

     文件       1270  2008-04-01 21:47  saolei\res\bitmap1.bmp

     文件       1270  2008-04-01 21:22  saolei\res\bitmap2.bmp

     文件       1078  2008-04-01 21:22  saolei\res\bitmap4.bmp

     文件       1078  2008-04-01 17:35  saolei\res\Toolbar.bmp

     文件       1078  2008-04-01 17:35  saolei\res\扫雷.ico

     文件        396  2008-04-01 17:35  saolei\res\扫雷.rc2

     文件       1078  2008-04-01 17:35  saolei\res\扫雷Doc.ico

     文件        910  2008-04-01 21:30  saolei\resource.h

     文件        206  2008-04-01 17:35  saolei\StdAfx.cpp

     文件       1054  2008-04-01 17:35  saolei\StdAfx.h

     文件      34520  2008-04-18 19:03  saolei\扫雷.aps

     文件       1898  2008-04-18 19:03  saolei\扫雷.clw

     文件       4145  2008-04-01 17:35  saolei\扫雷.cpp

............此处省略18个文件信息

评论

共有 条评论