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

📄 towerdlg.h

📁 自制 汉诺塔 游戏 mfc程序 程序非常简单 适合初学
💻 H
字号:
// towerDlg.h : header file
//

#if !defined(AFX_TOWERDLG_H__C2790FA3_CAFB_4277_8A03_EBDFCDCA6B48__INCLUDED_)
#define AFX_TOWERDLG_H__C2790FA3_CAFB_4277_8A03_EBDFCDCA6B48__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CTowerDlg dialog

class CTowerDlg : public CDialog
{
// Construction
public:
	CRect GetItemRect(int idc);
	CRect GetTopRect(int *tower);
	int * setbac1,*setbac2;
	int GetLestStep();
	int stepout;
	void IsWin();
	void Move(int *set,int *setbefore);
	void OnButton(int *i);
	int *set,*setbefore;
	void PaintTower(CPaintDC &dc,int idc,int a[]);
	void SetFloor(int floor);
	int a[1+9], b[1+9], c[1+9];   //index 0 sign the num of this tower
	int floor;
	CTowerDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CTowerDlg)
	enum { IDD = IDD_TOWER_DIALOG };
	CButton	btnbac;
	CSpinButtonCtrl	spin;
	CEdit	edit;
	CStatic	out;
	CButton	btnc;
	CButton	btnb;
	CButton	btna;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CTowerDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonA();
	afx_msg void OnButtonB();
	afx_msg void OnButtonC();
	afx_msg void OnNew();
	afx_msg void OnBac();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_TOWERDLG_H__C2790FA3_CAFB_4277_8A03_EBDFCDCA6B48__INCLUDED_)

⌨️ 快捷键说明

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