📄 mycalculatordlg.h
字号:
// MyCalculatorDlg.h : header file
//
#if !defined(AFX_MYCALCULATORDLG_H__2CAE160C_1B47_43B9_BBEF_8C01CFC487FF__INCLUDED_)
#define AFX_MYCALCULATORDLG_H__2CAE160C_1B47_43B9_BBEF_8C01CFC487FF__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CMyCalculatorDlg dialog
class CMyCalculatorDlg : public CDialog
{
// Construction
public:
double m_op;
int m_item;//标志运算对象
//double m_third;
CString m_operator;
double m_coff;
double m_second;
double m_first;
CMyCalculatorDlg(CWnd* pParent = NULL); // standard constructor
void Calculate();
void UpdateDisplay(double lVal);
void OnButton(int);
// Dialog Data
//{{AFX_DATA(CMyCalculatorDlg)
enum { IDD = IDD_MYCALCULATOR_DIALOG };
CString m_display;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyCalculatorDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CMyCalculatorDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnButton0();
afx_msg void OnButton1();
afx_msg void OnButton2();
afx_msg void OnButton3();
afx_msg void OnButton4();
afx_msg void OnButton5();
afx_msg void OnButton6();
afx_msg void OnButton7();
afx_msg void OnButton8();
afx_msg void OnButton9();
afx_msg void OnButtonAdd();
afx_msg void OnButtonBackspace();
afx_msg void OnButtonClear();
afx_msg void OnButtonDiv();
afx_msg void OnButtonEqual();
afx_msg void OnButtonMutiply();
afx_msg void OnButtonPoint();
afx_msg void OnButtonReciprocal();
afx_msg void OnButtonSign();
afx_msg void OnButtonSqrt();
afx_msg void OnButtonMinus();
afx_msg void OnButtonMode();
afx_msg void OnMENUabout();
afx_msg void OnButtonClearnow();
afx_msg void OnButtonM();
afx_msg void OnButtonMs();
afx_msg void OnButtonMc();
afx_msg void OnButtonMr();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYCALCULATORDLG_H__2CAE160C_1B47_43B9_BBEF_8C01CFC487FF__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -