【正文】
s message pump. return FALSE。 int nResponse = ()。 m_pMainWnd = amp。 // Call this when using MFC in a shared DLLelse Enable3dControlsStatic()。/////////////////////////////////////////////////////////////////////////////// CZZApp initializationBOOL CZZApp::InitInstance(){ AfxEnableControlContainer()。///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}// Microsoft Visual C++ will insert additional declarations immediately before the previous line.endif // !defined(AFX_ZZ_H__D6CCE042_0495_4C65_8B5F_FC1236BFFCEC__INCLUDED_)// : Defines the class behaviors for the application.//include include include ifdef _DEBUGdefine new DEBUG_NEWundef THIS_FILEstatic char THIS_FILE[] = __FILE__。// Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CZZApp) public: virtual BOOL InitInstance()。39。 n=0。 opt=true。 } } n++。 opt=false。 m_Result=m_input。 } m=put。in。 } else if(dian==true)//如果小數(shù)點(diǎn)已經(jīng)被按下/////////////// { int i。 opt=false。 m_Result=m_input。m_done=false。 UpdateData(false)。 m_input=m_input+m。i++) { put=put/10。 for(i=0。 UpdateData(false)。m_done=false。 UpdateData(false)。 m_input=m_input*10+put。}void CZZDlg::Numin(double put){ if(m_done==true||opt==true) //如果一次計(jì)算結(jié)束或運(yùn)算符已經(jīng)選擇 { if(dian==false)//如果小數(shù)點(diǎn)還沒(méi)有被按下 { m_Result=m_input=。 dian=false。 } opt=false。 } else if(yun==10)//cos { m_Result=cos(num_1*PI/180)。 } else if(yun==9)//tan { m_Result=tan(num_1*PI/180)。 } else if(yun==8)//sin { m_Result=sin(num_1*PI/180)。 } m_Result=sqrt(num_1)。 } else if(yun==7)//根號(hào) { if(num_1=0) { m_Result=0。 } else if(yun==6)//平方 { m_Result=num_1*num_1。 } m_Result=log10(num_1)。 } else if(yun==5)//log { if(num_1=0) { m_Result=0。 } else if(yun==4)//除 { m_Result=num_1/num_2。 } else if(yun==3)//乘 { m_Result=num_1*num_2。 } else if(yun==2)//減 { m_Result=num_1num_2。 if(yun==1)//加 { m_Result=num_1+num_2。 n=0。 dian=false。 UpdateData(false)。}void CZZDlg::OnBce() { // TODO: Add your control notification handler code here // CE m_input=0。}void CZZDlg::Oncos() { // TODO: Add your control notification handler code here operate()。}void CZZDlg::Ontan() { // TODO: Add your control notification handler code here operate()。}void CZZDlg::Onsin() { // TODO: Add your control notification handler code here operate()。}void CZZDlg::Onsqrt() { // TODO: Add your control notification handler code here operate()。}void CZZDlg::Onpf() { // TODO: Add your control notification handler code here operate()。}void CZZDlg::Onlog() { // TODO: Add your control notification handler code here operate()。}void CZZDlg::OnBdiv() { // TODO: Add your control notification handler code here // / operate()。}void CZZDlg::OnBmult() { // TODO: Add your control notification handler code here // * operate()。}void CZZDlg::OnBsub() { // TODO: Add your control notification handler code here // operate()。}void CZZDlg::OnBadd() { // TODO: Add your control notification handler code here // + operate()。}void CZZDlg::OnBd() { // TODO: Add your control notification handler code here // . dian=true。}void CZZDlg::OnB8() { // TODO: Add your control notification handler code here // 8 Numin()。}void CZZDlg::OnB6() { // TODO: Add your control notification handler code here // 6 Numin()。 }void CZZDlg::OnB4() { // TODO: Add your control notification handler code here // 4 Numin()。}void CZZDlg::OnB2() { // TODO: Add your control notification handler code here // 2 Numin()。}void CZZDlg::OnB0() { // TODO: Add your control notification handler code here // 0 Numin()。 } else { CDialog::OnPaint()。 int y = (() cyIcon + 1) / 2。rect)。 CRect rect。 // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON)。 }}// If you add a minimize button to your dialog, you will need the code below// to draw the icon. For MFC applications using the document/view model,// this is automatically done for you by the framework.void CZZDlg::OnPaint() { if (IsIconic()) { CPaintDC dc(this)。 ()。 // return TRUE unless you set the focus to a control}void CZZDlg::OnSysCommand(UINT nID, LPARAM lParam){ if ((nID amp。 // Set big icon SetIcon(m_hIcon, FALSE)。 } } // Set the icon for this dialog. The framework does this automatically // when the application39。 if (!()) { pSysMenuAppendMenu(MF_SEPARATOR)。 if (pSysMenu != NULL) { CString strAboutMenu。 ASSERT(IDM_ABOUTBOX 0xF000)。 // Add About... menu item to system menu. // IDM_ABOUTBOX must be in the system mand range. ASSERT((IDM_ABOUTBOX amp。 opt=false,m_done=false。 //}}AFX_DATA_MAP