📄 labyrinthview.h
字号:
// LabyrinthView.h : interface of the CLabyrinthView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_LABYRINTHVIEW_H__5A6425C5_5466_4A1D_8C05_706271444E09__INCLUDED_)
#define AFX_LABYRINTHVIEW_H__5A6425C5_5466_4A1D_8C05_706271444E09__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "afxtempl.h"
struct MyNode
{
int x;
int y;
BYTE o;////Orient
BYTE flag;////是否走过标志
};
typedef CArray <MyNode,MyNode> NodeArray;
class CLabyrinthView : public CView
{
protected: // create from serialization only
CLabyrinthView();
DECLARE_DYNCREATE(CLabyrinthView)
// Attributes
public:
CLabyrinthDoc* GetDocument();
// Operations
public:
// NodeArry m_StackArr;
BOOL SearchFlag;
NodeArray m_NodeArr_Pass;
NodeArray m_NodeArr_Path;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CLabyrinthView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
void GetPath(int x, int y, int orient);
void SearchMaze(int x,int y,int orient);
int GetNextNode(int x,int y,int orient,int* xx,int* yy);
int GetNextNode1(int x,int y,int orient,int* xx,int* yy);
void DrawMyRectCell(CDC* pDC,CRect,int corlor);
virtual ~CLabyrinthView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CLabyrinthView)
afx_msg void OnMazeSearch();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in LabyrinthView.cpp
inline CLabyrinthDoc* CLabyrinthView::GetDocument()
{ return (CLabyrinthDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_LABYRINTHVIEW_H__5A6425C5_5466_4A1D_8C05_706271444E09__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -