• 大小: 4.35MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-01
  • 语言: C/C++
  • 标签: c++贪吃蛇  

资源简介

c++贪吃蛇编程源代码论文设计c语言

资源截图

代码片段和文件信息

// MainFrm.cpp : implementation of the CMainframe class
//

#include “stdafx.h“
#include “YuShuo.h“

#include “MainFrm.h“
#include “YsName.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

    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_YS_TOOLBAR))
{
TRACE0(“Failed to create toolbar\n“);
return -1;      // fail to create
}
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


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件      443392  2009-07-14 22:02  C++单文档贪吃蛇报告+源码\报告.doc
     目录           0  2017-06-23 20:13  C++单文档贪吃蛇报告+源码\程序\
     文件      481078  2009-06-25 23:18  C++单文档贪吃蛇报告+源码\程序\backround.bmp
     目录           0  2017-06-23 19:31  C++单文档贪吃蛇报告+源码\程序\Backup\
     目录           0  2017-06-23 20:13  C++单文档贪吃蛇报告+源码\程序\Debug\
     文件         234  2009-06-29 09:22  C++单文档贪吃蛇报告+源码\程序\Define.h
     目录           0  2017-06-23 19:31  C++单文档贪吃蛇报告+源码\程序\ipch\
     目录           0  2017-06-23 20:13  C++单文档贪吃蛇报告+源码\程序\ipch\yushuo-c4e2470f\
     文件        1334  2009-06-25 23:18  C++单文档贪吃蛇报告+源码\程序\iTudou.bmp
     文件        1334  2009-06-25 23:18  C++单文档贪吃蛇报告+源码\程序\iTunes.bmp
     文件        2687  2009-06-29 09:49  C++单文档贪吃蛇报告+源码\程序\MainFrm.cpp
     文件        1492  2009-06-29 09:59  C++单文档贪吃蛇报告+源码\程序\MainFrm.h
     文件        1334  2009-06-25 23:18  C++单文档贪吃蛇报告+源码\程序\QvodPlayer.bmp
     文件        4311  2009-06-22 08:51  C++单文档贪吃蛇报告+源码\程序\ReadMe.txt
     文件          23  2009-07-01 00:12  C++单文档贪吃蛇报告+源码\程序\Record.TXT
     文件          26  2009-06-30 23:41  C++单文档贪吃蛇报告+源码\程序\Record.TXT.bak
     目录           0  2010-11-17 23:15  C++单文档贪吃蛇报告+源码\程序\res\
     文件      481078  2009-06-22 08:57  C++单文档贪吃蛇报告+源码\程序\res\backround.bmp
     文件     2346000  2009-06-27 12:19  C++单文档贪吃蛇报告+源码\程序\res\hx.wav
     文件         766  2009-06-25 10:37  C++单文档贪吃蛇报告+源码\程序\res\icon1.ico
     文件        1334  2009-06-24 10:34  C++单文档贪吃蛇报告+源码\程序\res\iTudou.bmp
     文件        1334  2009-06-24 10:34  C++单文档贪吃蛇报告+源码\程序\res\iTunes.bmp
     文件       15276  2009-06-25 21:44  C++单文档贪吃蛇报告+源码\程序\res\Lose1.wav
     文件       20149  2009-06-25 23:29  C++单文档贪吃蛇报告+源码\程序\res\midi06.mid
     文件        1334  2009-06-24 10:34  C++单文档贪吃蛇报告+源码\程序\res\QvodPlayer.bmp
     文件        1078  2009-06-22 08:51  C++单文档贪吃蛇报告+源码\程序\res\Toolbar.bmp
     文件         630  2009-06-24 22:12  C++单文档贪吃蛇报告+源码\程序\res\toolbar1.bmp
     文件        3798  2009-06-25 21:44  C++单文档贪吃蛇报告+源码\程序\res\undo.wav
     文件       59410  2009-06-25 21:44  C++单文档贪吃蛇报告+源码\程序\res\Win1.wav
     文件        1078  2009-06-22 08:51  C++单文档贪吃蛇报告+源码\程序\res\YuShuo.ico
     文件         398  2009-06-22 08:51  C++单文档贪吃蛇报告+源码\程序\res\YuShuo.rc2
............此处省略42个文件信息

评论

共有 条评论