-
大小: 1.81MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-11-12
- 語言: C/C++
- 標(biāo)簽:
資源簡介
MFC仿Windows計(jì)算器,代碼簡單,功能齊全,適合初學(xué)者學(xué)習(xí)

代碼片段和文件信息
//?calculate.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“calculate.h“
#include?“calculateDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CCalculateApp
BEGIN_MESSAGE_MAP(CCalculateApp?CWinApp)
//{{AFX_MSG_MAP(CCalculateApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CCalculateApp?construction
CCalculateApp::CCalculateApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CCalculateApp?object
CCalculateApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CCalculateApp?initialization
BOOL?CCalculateApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CCalculateDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????22696??2013-11-19?22:41??calculate\calculate.aps
?????文件???????2236??2013-11-20?15:08??calculate\calculate.clw
?????文件???????2105??2013-11-16?20:53??calculate\calculate.cpp
?????文件???????4213??2013-11-16?20:53??calculate\calculate.dsp
?????文件????????526??2013-11-16?20:53??calculate\calculate.dsw
?????文件???????1357??2013-11-16?20:53??calculate\calculate.h
?????文件??????54784??2013-11-20?15:08??calculate\calculate.opt
?????文件????????980??2013-11-20?15:08??calculate\calculate.plg
?????文件???????7434??2013-11-19?20:03??calculate\calculate.rc
?????文件??????11274??2013-11-20?15:08??calculate\calculateDlg.cpp
?????文件???????2432??2013-11-20?15:07??calculate\calculateDlg.h
?????文件???????3633??2013-11-16?20:53??calculate\ReadMe.txt
?????文件???????1975??2013-11-16?21:09??calculate\resource.h
?????文件????????211??2013-11-16?20:53??calculate\StdAfx.cpp
?????文件???????1054??2013-11-16?20:53??calculate\StdAfx.h
?????文件?????114762??2013-11-20?15:08??calculate\Debug\calculate.exe
?????文件?????205276??2013-11-20?15:08??calculate\Debug\calculate.ilk
?????文件??????13954??2013-11-20?15:07??calculate\Debug\calculate.obj
?????文件????5500532??2013-11-20?15:07??calculate\Debug\calculate.pch
?????文件?????369664??2013-11-20?15:08??calculate\Debug\calculate.pdb
?????文件???????3540??2013-11-20?15:07??calculate\Debug\calculate.res
?????文件??????47106??2013-11-20?15:08??calculate\Debug\calculateDlg.obj
?????文件?????105622??2013-11-20?15:07??calculate\Debug\StdAfx.obj
?????文件?????205824??2013-11-20?15:08??calculate\Debug\vc60.idb
?????文件?????364544??2013-11-20?15:08??calculate\Debug\vc60.pdb
?????文件???????1078??2013-11-16?20:53??calculate\res\calculate.ico
?????文件????????401??2013-11-16?20:53??calculate\res\calculate.rc2
?????文件?????123904??2013-11-20?15:08??calculate\calculate.ncb
?????目錄??????????0??2013-11-17?17:49??calculate\Debug
?????目錄??????????0??2013-11-16?20:53??calculate\res
............此處省略4個文件信息
評論
共有 條評論