资源简介
C++课程设计贪吃蛇源码附带详细注释+该程序的课设报告。这是我曾经使用过进行C++课程设计的代码,有注释+课设报告,保证轻松完成答辩
代码片段和文件信息
// eat.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “eat.h“
#include “MainFrm.h“
#include “eatDoc.h“
#include “eatView.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEatApp
BEGIN_MESSAGE_MAP(CEatApp CWinApp)
//{{AFX_MSG_MAP(CEatApp)
ON_COMMAND(ID_APP_ABOUT OnAppAbout)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEatApp construction
CEatApp::CEatApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CEatApp object
CEatApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CEatApp initialization
BOOL CEatApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register the application‘s document templates. Document templates
// serve as the connection between documents frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CEatDoc)
RUNTIME_CLASS(CMainframe) // main SDI frame window
RUNTIME_CLASS(CEatView));
AddDocTemplate(pDocTemplate);
// Parse command line for standard shell commands DDE file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initialized so show and update it.
m_pMainWnd->SetWindowText(“贪吃蛇“); //主窗口标题
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 169337 2016-09-13 13:12 课设\C++课程设计报告.docx
文件 5686 2016-08-28 03:09 课设\贪吃蛇\1.bmp
文件 4534 2010-11-03 23:00 课设\贪吃蛇\2.bmp
文件 147534 2016-09-13 13:09 课设\贪吃蛇\Debug\eat.exe
文件 374472 2016-09-13 13:09 课设\贪吃蛇\Debug\eat.ilk
文件 23049 2016-09-13 13:09 课设\贪吃蛇\Debug\eat.obj
文件 5695624 2016-08-28 16:31 课设\贪吃蛇\Debug\eat.pch
文件 492544 2016-09-13 13:09 课设\贪吃蛇\Debug\eat.pdb
文件 25684 2016-09-13 13:09 课设\贪吃蛇\Debug\eat.res
文件 14640 2016-09-06 17:22 课设\贪吃蛇\Debug\eatDoc.obj
文件 36893 2016-09-06 17:25 课设\贪吃蛇\Debug\eatView.obj
文件 18797 2016-09-06 16:51 课设\贪吃蛇\Debug\MainFrm.obj
文件 12591 2016-09-06 17:18 课设\贪吃蛇\Debug\snake.obj
文件 105581 2016-08-28 16:31 课设\贪吃蛇\Debug\StdAfx.obj
文件 369664 2016-09-13 13:09 课设\贪吃蛇\Debug\vc60.idb
文件 380928 2016-09-13 13:09 课设\贪吃蛇\Debug\vc60.pdb
文件 63012 2016-09-13 13:09 课设\贪吃蛇\eat.aps
文件 2137 2016-09-13 13:09 课设\贪吃蛇\eat.clw
文件 4209 2016-08-28 03:11 课设\贪吃蛇\eat.cpp
文件 4791 2010-11-04 00:35 课设\贪吃蛇\eat.dsp
文件 531 2010-11-02 20:20 课设\贪吃蛇\eat.dsw
文件 1323 2010-11-02 20:20 课设\贪吃蛇\eat.h
文件 189440 2016-09-13 13:10 课设\贪吃蛇\eat.ncb
文件 53760 2016-09-13 13:10 课设\贪吃蛇\eat.opt
文件 888 2016-09-13 13:09 课设\贪吃蛇\eat.plg
文件 11517 2016-09-13 13:09 课设\贪吃蛇\eat.rc
文件 1682 2010-11-02 20:20 课设\贪吃蛇\eatDoc.cpp
文件 1442 2010-11-02 20:20 课设\贪吃蛇\eatDoc.h
文件 7379 2016-09-06 17:25 课设\贪吃蛇\eatView.cpp
文件 2212 2016-09-04 21:28 课设\贪吃蛇\eatView.h
............此处省略20个文件信息
- 上一篇:C++程序发送邮件可带附件
- 下一篇:棋盘格标定图
评论
共有 条评论