www.pudn.com > Hanoi_Src.rar > HanoiDlg.h


// HanoiDlg.h : header file 
// 
 
#if !defined(AFX_HANOIDLG_H__60D04107_0B26_11D3_8EF2_0080C8EB5B82__INCLUDED_) 
#define AFX_HANOIDLG_H__60D04107_0B26_11D3_8EF2_0080C8EB5B82__INCLUDED_ 
 
#include  
#include "NextDlg.h" 
#include "ExitDlg.h" 
 
#define UP 15 
#define LEFT 7 
#define DOWN 195 
#define RIGHT 347 
#define WIDTH 100 
#define HEIGHT 180  
 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
///////////////////////////////////////////////////////////////////////////// 
// CHanoiDlg dialog 
 
class CHanoiDlg : public CDialog 
{ 
// Construction 
public: 
	CHanoiDlg(CWnd* pParent = NULL);	// standard constructor 
 
	UINT m_nDiskHeight; 
	CUIntArray DiskA; 
	CUIntArray DiskB; 
	CUIntArray DiskC; 
	CStringArray MoveTxt; 
 
	void Hanoi(UINT n,CUIntArray& diska,CUIntArray& diskb,CUIntArray& diskc); 
 
	void Move(CUIntArray& from, CUIntArray& to); 
 
	void DrawDisk(UINT which); 
	void DrawDiskA(); 
	void DrawDiskB(); 
	void DrawDiskC(); 
 
// Dialog Data 
	//{{AFX_DATA(CHanoiDlg) 
	enum { IDD = IDD_HANOI_DIALOG }; 
	UINT	m_nDiskNum; 
	UINT	m_nQueryNum; 
	CString	m_strMoveShow; 
	CString	m_strQueryShow; 
	UINT	m_nMoveNum; 
	BOOL	m_bAuto; 
	//}}AFX_DATA 
 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CHanoiDlg) 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
	HICON m_hIcon; 
 
	// Generated message map functions 
	//{{AFX_MSG(CHanoiDlg) 
	virtual BOOL OnInitDialog(); 
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 
	afx_msg void OnPaint(); 
	afx_msg HCURSOR OnQueryDragIcon(); 
	virtual void OnOK(); 
	afx_msg void OnQuery(); 
	virtual void OnCancel(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
}; 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_HANOIDLG_H__60D04107_0B26_11D3_8EF2_0080C8EB5B82__INCLUDED_)