// jisuanqiDlg.cpp : implementation file
//
#include "stdafx.h"
#include "jisuanqi.h"
#include "jisuanqiDlg.h"
#include "math.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CJisuanqiDlg dialog
CJisuanqiDlg::CJisuanqiDlg(CWnd* pParent )
: CDialog(CJisuanqiDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CJisuanqiDlg)
m_num = 0.0;
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CJisuanqiDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CJisuanqiDlg)
DDX_Text(pDX, IDC_EDIT1, m_num);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CJisuanqiDlg, CDialog)
//{{AFX_MSG_MAP(CJisuanqiDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
ON_BN_CLICKED(IDC_BUTTON5, OnButton5)
ON_BN_CLICKED(IDC_BUTTON6, OnButton6)
ON_BN_CLICKED(IDC_BUTTON7, OnButton7)
ON_BN_CLICKED(IDC_BUTTON8, OnButton8)
ON_BN_CLICKED(IDC_BUTTON9, OnButton9)
ON_BN_CLICKED(IDC_BUTTON14, OnButton0)
ON_BN_CLICKED(IDC_BUTTON15, OnButtonPoint)
ON_BN_CLICKED(IDC_BUTTON16, OnButtonEqual)
ON_BN_CLICKED(IDC_BUTTON13, OnButtonChu)
ON_BN_CLICKED(IDC_BUTTON12, OnButtonMul)
ON_BN_CLICKED(IDC_BUTTON11, OnButtonSub)
ON_BN_CLICKED(IDC_BUTTON10, OnButtonAdd)
ON_BN_CLICKED(IDC_BUTTON17, OnButtondelet)
ON_BN_CLICKED(IDC_BUTTON18, OnButtonclear)
ON_BN_CLICKED(IDC_BUTTON19, OnButtonkaifang)
ON_BN_CLICKED(IDC_BUTTON20, OnButtonziranduishu)
ON_BN_CLICKED(IDC_BUTTON21, OnButtonchangyongduishu)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CJisuanqiDlg message handlers
BOOL CJisuanqiDlg::OnInitDialog()//初始
化变量
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX &; 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadStr