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

📄 24dlg.h

📁 24游戏
💻 H
字号:
// 24Dlg.h : header file
//

#if !defined(AFX_24DLG_H__89773330_12CB_4E10_AA08_BADC57D782C6__INCLUDED_)
#define AFX_24DLG_H__89773330_12CB_4E10_AA08_BADC57D782C6__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CMy24Dlg dialog

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


	int Compute(int iLeft, int iRight, int iOp) 
	{ 
		switch(iOp) 
		{	 
			case 0: 
				return iLeft+iRight; 
			case 1: 
				return iLeft-iRight; 
			case 2: 
				return iLeft*iRight; 
			case 3: 
				if(iRight == 0) 
					return -100000;
				if(iLeft/iRight*iRight != iLeft)
					return -100000;
				return iLeft/iRight; 
		} 
		return -100000; 
	} 

/*	bool Can(double dAnswer)
	{
		double abs1 = dAnswer-24 > 0 ? dAnswer-24 : 24-dAnswer;
		double abs2 = dAnswer+24 > 0 ? dAnswer+24 : -(dAnswer+24);
		if(abs1<1e-5 || abs2<1e-5)	
		{
			return true;
		}
		return false;
	}
*/
// Dialog Data
	//{{AFX_DATA(CMy24Dlg)
	enum { IDD = IDD_MY24_DIALOG };
	CEdit	m_Edit6;
	CEdit	m_Edit5;
	CEdit	m_Edit4;
	CEdit	m_Edit3;
	CEdit	m_Edit2;
	CEdit	m_Edit1;
	CButton	m_Exit;
	CButton	m_Calculate;
	CButton	m_About;
	int		m_int1;
	int		m_int2;
	int		m_int3;
	int		m_int4;
	CString	m_String;
	CString	m_bool;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMy24Dlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnExitButton();
	afx_msg void OnAboutButton();
	afx_msg void OnCalculateButton();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_24DLG_H__89773330_12CB_4E10_AA08_BADC57D782C6__INCLUDED_)

⌨️ 快捷键说明

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