• 大小: 7.37MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-02
  • 语言: C/C++
  • 标签: 迷宫  c++  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)
// NOTE - the ClassWizard will add and remove mapping macros here.
//    DO NOT EDIT what you see in these blocks of generated code !
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

static UINT indicators[] =
{
ID_SEPARATOR           // status line indicator
ID_INDICATOR_ROWCOLUMN
};

/////////////////////////////////////////////////////////////////////////////
// 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(“未能创建工具栏\n“);
return -1;      // 未能创建
}
m_wndToolBar.GetToolBarCtrl().HideButton(ID_PAUSETRUE);


AddDefineMazeToolBar();


if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators
  sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“未能创建状态栏\n“);
return -1;      // 未能创建
}
this->m_wndStatusBar.SetPaneInfo(1ID_INDICATOR_ROWCOLUMN SBPS_NOBORDERS|SBPS_POPOUT 100);



// TODO: 如果不需要工具栏可停靠,则删除这三行
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
this->m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
this->m_wndToolBarDefineMaze.EnableDocking(CBRS_ALIGN_ANY);

EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);

this->RecalcLayout();//一定要先加上这句
CRect rect;
this->m_wndToolBar.GetWindowRect(&rect);
rect.OffsetRect(10);
this->DockControlBar(&this->m_wndToolBarDefineMazeAFX_IDW_DOCKBAR_TOP&rect);

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::SetPaneText(CString content)
{
this->m_wndStatusBar.SetPaneText(0content);
}

void CMainframe::SetPaneOfRolc

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

     文件      47760  2009-03-04 05:36  迷宫益智游戏\1 生成迷宫演示.JPG

     文件      20906  2009-03-04 05:37  迷宫益智游戏\2 系统参数设置.JPG

     文件      19401  2009-03-04 05:38  迷宫益智游戏\3 迷宫布局设置.JPG

     文件      23821  2009-03-04 05:39  迷宫益智游戏\4 堆栈算法结果.JPG

     文件      23437  2009-03-04 05:39  迷宫益智游戏\5 队列算法搜索过程.JPG

     文件      20950  2009-03-04 05:39  迷宫益智游戏\6 队列算法搜索结果.JPG

     文件      27517  2008-08-13 17:04  迷宫益智游戏\BIN\MainFrm.obj

     文件          0  2008-08-13 17:04  迷宫益智游戏\BIN\MainFrm.sbr

     文件      72014  2008-08-13 17:04  迷宫益智游戏\BIN\Maze.obj

     文件          0  2008-08-13 17:04  迷宫益智游戏\BIN\Maze.sbr

     文件     106579  2008-08-12 00:04  迷宫益智游戏\BIN\MyFreshBrush.dll

     文件       3780  2008-08-12 00:04  迷宫益智游戏\BIN\MyFreshBrush.lib

     文件      34624  2008-08-13 17:04  迷宫益智游戏\BIN\SettingDlg.obj

     文件          0  2008-08-13 17:04  迷宫益智游戏\BIN\SettingDlg.sbr

     文件     105747  2008-08-13 17:04  迷宫益智游戏\BIN\StdAfx.obj

     文件    1375004  2008-08-13 17:04  迷宫益智游戏\BIN\StdAfx.sbr

     文件     246784  2008-12-19 18:35  迷宫益智游戏\BIN\vc60.idb

     文件     413696  2008-08-13 17:04  迷宫益智游戏\BIN\vc60.pdb

     文件    3335168  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法.bsc

     文件     180304  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法.exe

     文件     481692  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法.ilk

     文件      28523  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法.obj

     文件    6869072  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法.pch

     文件     451584  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法.pdb

     文件      17336  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法.res

     文件          0  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法.sbr

     文件      27516  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法Doc.obj

     文件          0  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法Doc.sbr

     文件      73545  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法View.obj

     文件          0  2008-08-13 17:04  迷宫益智游戏\BIN\迷宫算法View.sbr

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

评论

共有 条评论