• 大小: 4.45MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-15
  • 语言: C/C++
  • 标签: 八皇后  MFC  

资源简介

VC课上老师布置的作业,基本功能可以实现,可视化效果较好,利于初学者学习

资源截图

代码片段和文件信息

// EightQueen.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “EightQueen.h“

#include “MainFrm.h“
#include “EightQueenDoc.h“
#include “EightQueenView.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CEightQueenApp

BEGIN_MESSAGE_MAP(CEightQueenApp CWinApp)
//{{AFX_MSG_MAP(CEightQueenApp)
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)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEightQueenApp construction

CEightQueenApp::CEightQueenApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CEightQueenApp object

CEightQueenApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CEightQueenApp initialization

BOOL CEightQueenApp::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(CEightQueenDoc)
RUNTIME_CLASS(CMainframe)       // main SDI frame window
RUNTIME_CLASS(CEightQueenView));
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->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();

return TRUE;
}


////////////////////////

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-06-02 22:07  EightQueen\
     目录           0  2013-06-02 21:53  EightQueen\Debug\
     文件     3408896  2013-06-02 21:53  EightQueen\Debug\EightQueen.bsc
     文件      131184  2013-06-02 21:53  EightQueen\Debug\EightQueen.exe
     文件      338240  2013-06-02 21:53  EightQueen\Debug\EightQueen.ilk
     文件       23361  2013-06-02 18:07  EightQueen\Debug\EightQueen.obj
     文件     6931104  2013-06-02 11:07  EightQueen\Debug\EightQueen.pch
     文件      492544  2013-06-02 21:53  EightQueen\Debug\EightQueen.pdb
     文件       17336  2013-06-02 10:48  EightQueen\Debug\EightQueen.res
     文件           0  2013-06-02 18:07  EightQueen\Debug\EightQueen.sbr
     文件       15221  2013-06-02 11:07  EightQueen\Debug\EightQueenDoc.obj
     文件           0  2013-06-02 11:07  EightQueen\Debug\EightQueenDoc.sbr
     文件       29387  2013-06-02 21:53  EightQueen\Debug\EightQueenView.obj
     文件           0  2013-06-02 21:53  EightQueen\Debug\EightQueenView.sbr
     文件       18971  2013-06-02 21:21  EightQueen\Debug\MainFrm.obj
     文件           0  2013-06-02 21:21  EightQueen\Debug\MainFrm.sbr
     文件      105881  2013-06-02 11:07  EightQueen\Debug\StdAfx.obj
     文件     1366658  2013-06-02 11:07  EightQueen\Debug\StdAfx.sbr
     文件      214016  2013-06-02 21:55  EightQueen\Debug\vc60.idb
     文件      389120  2013-06-02 21:53  EightQueen\Debug\vc60.pdb
     文件       53736  2013-06-02 10:48  EightQueen\EightQueen.aps
     文件        1839  2013-06-02 22:07  EightQueen\EightQueen.clw
     文件        4186  2013-05-31 23:59  EightQueen\EightQueen.cpp
     文件        4640  2013-06-02 11:08  EightQueen\EightQueen.dsp
     文件         528  2013-05-31 23:59  EightQueen\EightQueen.dsw
     文件        1412  2013-06-02 10:33  EightQueen\EightQueen.h
     文件       66560  2013-06-02 22:07  EightQueen\EightQueen.ncb
     文件       50688  2013-06-02 22:07  EightQueen\EightQueen.opt
     文件        1671  2013-06-02 21:53  EightQueen\EightQueen.plg
     文件        9977  2013-06-02 10:48  EightQueen\EightQueen.rc
     文件        1822  2013-05-31 23:59  EightQueen\EightQueenDoc.cpp
............此处省略14个文件信息

评论

共有 条评论