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

📄 汉诺塔dlg.h

📁 It s a C programming language cource from NUAA(Nanjing University of Aeronautics and Astronautics ),
💻 H
字号:
// 汉诺塔Dlg.h : header file
//

#if !defined(AFX_DLG_H__6F346C11_76E2_42CA_ACB6_7040244805B5__INCLUDED_)
#define AFX_DLG_H__6F346C11_76E2_42CA_ACB6_7040244805B5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CMyDlg dialog

class CMyDlg : public CDialog
{
// Construction
public:
	CMyDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CMyDlg)
	enum { IDD = IDD_MY_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	int MoveDish(int n, int a, int b); // 将a最上面的n个盘子移动到b
	void ShowBg(CDC * dc); // 显示函数
	void SetDishNumber(int n); // 设置盘子个数

	int number; // 盘子数
	int dish[7]; // 每个盘子所在位置

	int opt[30][3]; // 操作栈,用于保存将要进行的操作,因为操作要分步进行,故采用栈模拟递归,从而将操作分解
	int pn; // 栈顶位置
	// Generated message map functions
	//{{AFX_MSG(CMyDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton2();
	afx_msg void OnButton1();
	afx_msg void OnR3();
	afx_msg void OnR4();
	afx_msg void OnR5();
	afx_msg void OnR6();
	afx_msg void OnR7();
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLG_H__6F346C11_76E2_42CA_ACB6_7040244805B5__INCLUDED_)

⌨️ 快捷键说明

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