mycalcdlg.h
来自「一个比较简单的计算器,基本完成了实数的加减乘除的功能,还有取负号,开方,倒数,清」· C头文件 代码 · 共 77 行
H
77 行
// MyCalcDlg.h : header file
//
#if !defined(AFX_MYCALCDLG_H__9550A229_F723_4EC2_AD2B_8CA5868E08F7__INCLUDED_)
#define AFX_MYCALCDLG_H__9550A229_F723_4EC2_AD2B_8CA5868E08F7__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CMyCalcDlg dialog
class CMyCalcDlg : public CDialog
{
// Construction
public:
CMyCalcDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMyCalcDlg)
enum { IDD = IDD_MYCALC_DIALOG };
CString m_display;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyCalcDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
double m_coff;
CString m_operator;
double m_second;
double m_first;
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CMyCalcDlg)
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 OnButtonClear();
afx_msg void OnButtonAdd();
afx_msg void OnButtonEqual();
afx_msg void OnButtonMinus();
afx_msg void OnButtonMutiply();
afx_msg void OnButtonDiv();
afx_msg void OnButtonSqrt();
afx_msg void OnButtonReciprocal();
afx_msg void OnButtonPoint();
afx_msg void OnButtonSign();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void Calculate();
void SetDisplay(double i);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYCALCDLG_H__9550A229_F723_4EC2_AD2B_8CA5868E08F7__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?