?? calculatordlg.h
字號:
// CalculatorDlg.h : header file
//
#if !defined(AFX_CALCULATORDLG_H__7C29CD37_C43E_40A8_92D7_60438FF8EB70__INCLUDED_)
#define AFX_CALCULATORDLG_H__7C29CD37_C43E_40A8_92D7_60438FF8EB70__INCLUDED_
#define YUANZHOU 3.14
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CCalculatorDlg dialog
#include "AdvButton.h"
#include "AdvEdit.h"
class CCalculatorDlg : public CDialog
{
// Construction
public:
CCalculatorDlg(CWnd* pParent = NULL); // standard constructor
void TZero(char *pStr,int iLen);//用于去掉字符串尾部多余的零
void Result();//用來處理按下符號鍵時的函數,是計算的核心函數
float convertToH(float w);
// CAdvButton m_AdvButton17;
CMenu * m_Menu;
BOOL m_IsExtend;
// Dialog Data
//{{AFX_DATA(CCalculatorDlg)
enum { IDD = IDD_CALCULATOR_DIALOG };
CAdvButton m_AdvButton0;
CAdvButton m_AdvButton1;
CAdvButton m_AdvButton2;
CAdvButton m_AdvButton3;
CAdvButton m_AdvButton4;
CAdvButton m_AdvButton5;
CAdvButton m_AdvButton6;
CAdvButton m_AdvButton7;
CAdvButton m_AdvButton8;
CAdvButton m_AdvButton9;
CAdvButton m_AdvButtonPoint;
CAdvButton m_AdvButtonEqu;
CAdvButton m_AdvButtonAdd;
CAdvButton m_AdvButtonSub;
CAdvButton m_AdvButtonMul;
CAdvButton m_AdvButtonDiv;
CAdvButton m_AdvButtonClear;
CAdvButton m_AdvButtonSqrt;
CAdvButton m_AdvButtonReverse;
CAdvButton m_AdvButtonSin;
CAdvButton m_AdvButtonCos;
CAdvButton m_AdvButtonTan;
CAdvButton m_AdvButtonSqu;
CAdvButton m_AdvButtonCub;
CAdvButton m_AdvButtonPow;
CAdvButton m_AdvButtonExp;
CAdvButton m_AdvButtonLn;
CAdvButton m_AdvButtonLog;
CAdvButton m_AdvButtonZof;
CAdvButton m_AdvButtonN;
CAdvButton m_AdvButton10X;
CAdvButton m_AdvButtonAbout;
CButton m_DspStatic;
CAdvEdit m_DspEdit; //顯示計算結果的編輯器
CAdvButton m_AdvButtonOff;
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCalculatorDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX);
// DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CCalculatorDlg)
virtual BOOL OnInitDialog();
virtual void OnOK();//虛函數 ,覆蓋用來屏蔽Enter操作
virtual void OnCancel();
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 On10();
afx_msg void On11();
afx_msg void On12();
afx_msg void On13();
afx_msg void On14();
afx_msg void On15();
afx_msg void On16();
afx_msg void On17();
afx_msg void On18();
afx_msg void On19();
afx_msg void On2();
afx_msg void On20();
afx_msg void On21();
afx_msg void On22();
afx_msg void On23();
afx_msg void On24();
afx_msg void On25();
afx_msg void On26();
afx_msg void On27();
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 HBRUSH OnCtlColor(CDC* pDC,CWnd* pWnd,UINT nCtlColor);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);//響應消息WM_ON_CREATE
afx_msg void OnExtend();
afx_msg void OnZOF();
afx_msg void OnN();
afx_msg void On10X();
afx_msg void OnABOUT();
afx_msg void OnHex();
afx_msg void OnOct();
afx_msg void OnRad();
afx_msg void OnDec();
afx_msg void OnBin();
afx_msg void OnDegree();
afx_msg void OnTidu();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
CString m_StrBegin;//記錄初始操作數,字符串
char m_buffer[100];//記錄結果操作數,字符串
double m_begin;//記錄初始操作數,浮點
double m_end;//記錄結果操作數,浮點
int m_bit;//記錄運算符
int m_IsCheckPoint;//標識是否按下了小數點符號
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CALCULATORDLG_H__7C29CD37_C43E_40A8_92D7_60438FF8EB70__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -