⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m_artificialmapchoose.cpp

📁 利用人工智能的经典算法实现迷宫游戏;里面的A星(a*)算法可以很方便的移植到应用程序中
💻 CPP
字号:
// m_ArtificialMapChoose.cpp : implementation file
//

#include "stdafx.h"
#include "qiyuan.h"
#include "m_ArtificialMapChoose.h"

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

/////////////////////////////////////////////////////////////////////////////
// m_ArtificialMapChoose dialog


m_ArtificialMapChoose::m_ArtificialMapChoose(CWnd* pParent /*=NULL*/)
	: CDialog(m_ArtificialMapChoose::IDD, pParent)
{
	//{{AFX_DATA_INIT(m_ArtificialMapChoose)
	m_ArtificialMap = -1;
	//}}AFX_DATA_INIT
}


void m_ArtificialMapChoose::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(m_ArtificialMapChoose)
	DDX_CBIndex(pDX, IDC_COMBO1, m_ArtificialMap);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(m_ArtificialMapChoose, CDialog)
	//{{AFX_MSG_MAP(m_ArtificialMapChoose)
	ON_WM_CANCELMODE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// m_ArtificialMapChoose message handlers

BOOL m_ArtificialMapChoose::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString("迷宫1");
	((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString("迷宫2");
	((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString("迷宫3");
	((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString("迷宫4");
	((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString("迷宫5");
	((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString("迷宫6");
	((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString("迷宫7");
	((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString("迷宫8");
	((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString("迷宫9");
	((CComboBox*)GetDlgItem(IDC_COMBO1))->AddString("迷宫10");
	((CComboBox*)GetDlgItem(IDC_COMBO1))->SetCurSel(0);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void m_ArtificialMapChoose::OnCancelMode() 
{
	CDialog::OnCancelMode();
	
	// TODO: Add your message handler code here
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -