📄
字号:
// 计算器Dlg.h : header file
//
#if !defined(AFX_DLG_H__0889D8EB_7AEF_4F98_9DD7_DF222153AE6C__INCLUDED_)
#define AFX_DLG_H__0889D8EB_7AEF_4F98_9DD7_DF222153AE6C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ColorButton.h"
#include "MyEdit.h"
#include "AboutDlg.h"
#define FADD 1
#define FSUB 2
#define FMUL 3
#define FDIV 4
#define FPOW 5
#define FAND 6
#define FOR 7
#define FXOR 8
#define FNUM16 9
#define FNUM10 10
#define FNUM8 11
#define FNUM2 12
/////////////////////////////////////////////////////////////////////////////
// CMyDlg dialog
class CMyDlg : public CDialog
{
// Construction
public:
CMyDlg(CWnd* pParent = NULL); // standard constructor
CMyEdit Screen;
CStatic Show;
CComboBox Group;
CButton Num16;
CButton Num10;
CButton Num8;
CButton Num2;
CColorButton btn0;
CColorButton btn1;
CColorButton btn2;
CColorButton btn3;
CColorButton btn4;
CColorButton btn5;
CColorButton btn6;
CColorButton btn7;
CColorButton btn8;
CColorButton btn9;
CColorButton btnNeg;
CColorButton btnPoint;
CColorButton btnAdd;
CColorButton btnSub;
CColorButton btnMul;
CColorButton btnDiv;
CColorButton btnSqrt;
CColorButton btnPercent;
CColorButton btnReciprocal;
CColorButton btnEqual;
CColorButton btnMadd;
CColorButton btnMread;
CColorButton btnMsave;
CColorButton btnMclear;
CColorButton btnBackspace;
CColorButton btnClean;
CColorButton btnClear;
CColorButton btnA;
CColorButton btnB;
CColorButton btnC;
CColorButton btnD;
CColorButton btnE;
CColorButton btnF;
CColorButton btnNot;
CColorButton btnAnd;
CColorButton btnOr;
CColorButton btnXor;
CColorButton btnxStepy;
CColorButton btnxStep3;
CColorButton btnxStep2;
CColorButton btnFactorial;
CColorButton btnPi;
CColorButton btnLn;
CColorButton btnLg;
CColorButton btnExp;
CColorButton btnAsin;
CColorButton btnAcos;
CColorButton btnAtan;
CColorButton btnSin;
CColorButton btnCos;
CColorButton btnTan;
// Dialog Data
//{{AFX_DATA(CMyDlg)
enum { IDD = IDD_CALCULATE };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
//}}AFX_VIRTUAL
// Implementation
private:
char ScrLen,ScrText[40],Sign,Fpoint,Flag,FNum;
BYTE Key;
HICON m_hIcon;
CFont ft;
protected:
double ScrNum,Scr_Num,MNum;
long LengthOfString(const char *str);
long GetCharPosFromLeft(const char *str1,char chr);
long GetUnCharPosFromRight(const char *str1,char chr);
void DoubleToString(double sum,char *str);
void Delay(unsigned long ti);
void Num10ToNum2(long num10,char *num2);
void Num10ToNum8(long num10,char *num8);
void Num10ToNum16(long num10,char *num16);
// Generated message map functions
//{{AFX_MSG(CMyDlg)
virtual BOOL OnInitDialog();
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 OnBackspace();
afx_msg void OnClean();
afx_msg void OnClear();
afx_msg void OnDiv();
afx_msg void OnEqual();
afx_msg void OnMadd();
afx_msg void OnMclear();
afx_msg void OnMread();
afx_msg void OnMsave();
afx_msg void OnMul();
afx_msg void OnNeg();
afx_msg void OnPercent();
afx_msg void OnPoint();
afx_msg void OnReciprocal();
afx_msg void OnSqrt();
afx_msg void OnSub();
afx_msg void OnCopy();
afx_msg void OnPaste();
afx_msg void OnInitMenuPopup(CMenu *pPopupMenu,UINT nIndex,BOOL bSysMenu);
afx_msg void OnStandard();
afx_msg void OnExtend();
afx_msg void OnHelp();
afx_msg void OnAbout();
afx_msg void OnA();
afx_msg void OnB();
afx_msg void OnC();
afx_msg void OnD();
afx_msg void OnE();
afx_msg void OnF();
afx_msg void OnPi();
afx_msg void OnAnd();
afx_msg void OnNot();
afx_msg void OnOr();
afx_msg void OnXor();
afx_msg void OnArccos();
afx_msg void OnArcsin();
afx_msg void OnArctan();
afx_msg void OnCos();
afx_msg void OnExp();
afx_msg void OnFactorial();
afx_msg void OnLg();
afx_msg void OnLn();
afx_msg void OnSin();
afx_msg void OnTan();
afx_msg void OnXstep2();
afx_msg void OnXstep3();
afx_msg void OnXstepy();
afx_msg void On10num();
afx_msg void On16num();
afx_msg void On8num();
afx_msg void On2num();
//}}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__0889D8EB_7AEF_4F98_9DD7_DF222153AE6C__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -