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

📄 cacl2dlg.h

📁 简单计算器的c++源码
💻 H
字号:
// Cacl2Dlg.h : header file
//

#if !defined(AFX_CACL2DLG_H__E7E815D2_8B3B_45BC_8088_E7E438FDBF77__INCLUDED_)
#define AFX_CACL2DLG_H__E7E815D2_8B3B_45BC_8088_E7E438FDBF77__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Math.h"

/////////////////////////////////////////////////////////////////////////////
// CCacl2Dlg dialog

class CCacl2Dlg : public CDialog
{
// Construction
public:
	int m_fun;						//m_fun是运算符如:+,-,*,/
	void AddFun(int j);				//该函数的功能是输入数字
	void AddNum(int i);				//该函数的功能是输入运算符
	int m_ForS;						//指示此时输入的是
									//第一个数还是第二个数							
	bool m_firx,m_secx;				//指示此时是否在输入小数部分
									//即是否按过了小数点
	double m_first,m_second;		//第一第二个数	
	double m_firstz,m_secondz;		//第一第二个数的整数部分
	double m_firstx,m_secondx;		//第一第二个数的小数部分
		
	int m_firxw,m_secxw;			//第一第二个数的小数部分的位数
	int m_firzorf,m_seczorf;		//指示是否是负数
									//既是否按过+/-键
	bool m_EnterSec;				//是否输入了第二个数;

	double m_result;				//结果
	double m_mfir,m_msec;			// 记住上次参加运算的第一二个数
	bool m_sfmf,m_sfms,m_sfmfun;	//指示是否此时还记的上次的数和运算符
	int m_mfun;						//记住上次的运算符
	CCacl2Dlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CCacl2Dlg)
	enum { IDD = IDD_CACL2_DIALOG };
	CEdit	m_xedit;
	double	m_x;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CCacl2Dlg)
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void On0();
	afx_msg void On1();
	afx_msg void On2();
	afx_msg void On3();
	afx_msg void On4();
	afx_msg void On5();
	afx_msg void On6();
	afx_msg void On7();
	afx_msg void On8();
	afx_msg void On9();
	afx_msg void OnAdd();
	afx_msg void OnBack();
	afx_msg void OnDiv();
	afx_msg void OnGo();
	afx_msg void OnOn();
	afx_msg void OnSub();
	afx_msg void OnTim();
	afx_msg void OnXsd();
	afx_msg void OnZfh();
	afx_msg void OnAbtath();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_CACL2DLG_H__E7E815D2_8B3B_45BC_8088_E7E438FDBF77__INCLUDED_)

⌨️ 快捷键说明

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