📄 towermfcdlg.h
字号:
// TowerMfcDlg.h : header file
//
#if !defined(AFX_TOWERMFCDLG_H__CABBE030_34B6_4ABA_945B_86D66EE31F36__INCLUDED_)
#define AFX_TOWERMFCDLG_H__CABBE030_34B6_4ABA_945B_86D66EE31F36__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Tower.h"
#include <vector>
using namespace std;
/////////////////////////////////////////////////////////////////////////////
// CTowerMfcDlg dialog
#include "InitDlg.h"
struct StartToEnd
{
int a;
int b;
};
class CTowerMfcDlg : public CDialog
{
// Construction
public:
CTowerMfcDlg(CWnd* pParent = NULL); // standard constructor
void hanoi(int n,int a,int b,int c);
public:
CTower m_tower_first; //第一个汉诺塔
CTower m_tower_second; //第二个汉诺塔
CTower m_tower_three; //第三个汉诺塔
BOOL m_first; ///用于第一次显示
int floor; //汉诺塔的层数
vector<StartToEnd> m_line; //保存路线
int i; //向量的下标
// Dialog Data
//{{AFX_DATA(CTowerMfcDlg)
enum { IDD = IDD_TOWERMFC_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTowerMfcDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CTowerMfcDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnAdd();
afx_msg void OnDelete();
afx_msg void OnNext();
afx_msg void OnForward();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TOWERMFCDLG_H__CABBE030_34B6_4ABA_945B_86D66EE31F36__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -