?? 計(jì)算器dlg.h
字號:
// 計(jì)算器Dlg.h : header file
//
#if !defined(AFX_DLG_H__673D46A6_6833_4CDE_BE5B_2C45A9809CB4__INCLUDED_)
#define AFX_DLG_H__673D46A6_6833_4CDE_BE5B_2C45A9809CB4__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include<math.h>
/////////////////////////////////////////////////////////////////////////////
// CMyDlg dialog
class CMyDlg : public CDialog
{
// Construction
public:
BYTE m_cLast; //表示剛剛輸入的數(shù)字或操作符
BYTE m_cLastOpr; //表示上次輸入的操作符
int m_nFraction; //小數(shù)點(diǎn)后的數(shù)字位數(shù),-1表示無小數(shù)點(diǎn)
int m_nDigitLen; //所輸入數(shù)的位數(shù)
double m_dNumber; //正在輸入的浮點(diǎn)數(shù)
int m_nSign; //正負(fù)號
double m_dOperands[3]; //操作數(shù)數(shù)組
BYTE m_cOprs[3]; //操作符數(shù)組
int m_nOprldx; //操作符數(shù)組索引
CMyDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMyDlg)
enum { IDD = IDD_MY_DIALOG };
CString m_result;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
void Calculate();
int Operate(double& d1,double d2,BYTE opr);
int Priority(BYTE opr);
void DealDigit(int n);
void DealOpr(BYTE opr);
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CMyDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void On7();
afx_msg void On8();
afx_msg void On9();
afx_msg void Ondiv();
afx_msg void On4();
afx_msg void On5();
afx_msg void On6();
afx_msg void Onmul();
afx_msg void On1();
afx_msg void On2();
afx_msg void On3();
afx_msg void Onsub();
afx_msg void On0();
afx_msg void Onzf();
afx_msg void Onpoint();
afx_msg void Onadd();
afx_msg void Onequal();
afx_msg void OnBackspace();
afx_msg void OnCE();
afx_msg void Onsqrt();
afx_msg void Onsquare();
afx_msg void Oncb();
afx_msg void Onpi();
afx_msg void Onsin();
afx_msg void Oncos();
afx_msg void Ontan();
afx_msg void Onln();
afx_msg void Onlog();
afx_msg void Onexp();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DLG_H__673D46A6_6833_4CDE_BE5B_2C45A9809CB4__INCLUDED_)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -