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

📄 24diandlg.h

📁 24点游戏,用c++实现
💻 H
字号:
// 24DianDlg.h : header file
//
#include "BmpProc.h"
#include "EditEx.h"
#include "ComboEx.h"


#if !defined(AFX_24DIANDLG_H__E89C1AB9_FDC9_4BE4_B117_1CC0DD64924B__INCLUDED_)
#define AFX_24DIANDLG_H__E89C1AB9_FDC9_4BE4_B117_1CC0DD64924B__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CMy24DianDlg dialog
struct CardInfo
{
	CString m_strFileName;
	int m_nNum;
};
class CMy24DianDlg : public CDialog
{
// Construction
public:
	void InitEnterNum();
	void DrawLabel(CDC* pDC);
	void SetComboBox();
	void SetButtonEnabled();
	void DrawNum(CDC *pDC);
	void SetAnswerList();
	void DrawExpPos(CDC* pDC);
	void GetExp();
	void InitExpPos();
	void Snap(int nIndex);
	void MoveOp(const CPoint& point, int nIndex);
	int CapturedOp(const CPoint& point);
	void DrawOp(CDC*pDC);
	int CapturedCard(const CPoint& point);
	void MoveCard(const CPoint& point, int nIndex);
	void InitPos();
	
	void SetAnswerEditFocus();
	BOOL ContainNum(const CString& strExp);
	int NumCount(const CString& strExp);
	CString IsRight(BOOL& bIsAgain);
	void ShowEnterCtl(BOOL bShow=FALSE);

	void InvalidateRgn();
	void SetCard(int nCard,int nIndex);
	void GetRand4();
	void InitCardInfo();

	CMy24DianDlg(UINT nIDD, CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CMy24DianDlg)
	enum { IDD = IDD_MY24DIAN_DIALOG };
	CComboEx	m_ctlComboNum1;
	CComboEx	m_ctlComboNum4;
	CComboEx	m_ctlComboNum3;
	CComboEx	m_ctlComboNum2;
	CComboEx	m_ctlComboResult;
	CString	m_strResult;
	CString	m_strNum1;
	CString	m_strNum2;
	CString	m_strNum3;
	CString	m_strNum4;
	//}}AFX_DATA

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

// Implementation
protected:

	int m_nAnswerIndex;
	BOOL m_bStart;
	CEditEx m_ctlEditAnswerList;
	CEditEx m_ctlEditAnswer;
	int m_nCapturedCard;
	int m_nCapturedOp;

	CPoint m_ptDown;
	CRect m_rcCardPos[5];
	CRect m_rcOpPos[21];
	CRect m_rcExpOpPos[9];
	CRect m_rcExpCardPos[4];
	BOOL m_bIsEnter;
	int m_nRestCount;
	CBmpProc m_bmpBK;
	CBmpProc m_bmpCard[5];
//	CString	m_strNum[4];

	CString m_strAnswer;
	CString m_strAnswerList;

	CardInfo m_CardInfo[52];
	double m_dNum[4];
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMy24DianDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonAnswer();
	afx_msg void OnUpdateEnterNum(CCmdUI* pCmdUI);
	afx_msg void OnEnterNum();
	afx_msg void OnStart();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnBackground();
	afx_msg void OnAbout();
	afx_msg void OnSelchangeComboNum1();
	afx_msg void OnEditchangeComboNum1();
	afx_msg void OnEditchangeComboNum2();
	afx_msg void OnSelchangeComboNum2();
	afx_msg void OnEditchangeComboNum3();
	afx_msg void OnSelchangeComboNum3();
	afx_msg void OnEditchangeComboNum4();
	afx_msg void OnSelchangeComboNum4();
	afx_msg void OnButtonNoAnswer();
	afx_msg void OnButtonAllAnswer();
	afx_msg void OnButtonNextAnswer();
	afx_msg void OnHelp();
	afx_msg void OnEditchangeComboResult();
	afx_msg void OnSelchangeComboResult();
	afx_msg void OnUpdateStart(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_24DIANDLG_H__E89C1AB9_FDC9_4BE4_B117_1CC0DD64924B__INCLUDED_)

⌨️ 快捷键说明

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