資源簡介
本設計將實現一個簡單計算器。其類似于Windows附件中自帶的計算器。這個計算器不僅實現了簡單的四則運算功能,還實現了高級的科學計算功能,而且具有簡潔大方的圖文外觀。它的設計按軟件工程的方法進行,系統具有良好的界面、必要的交互信息和較好的健壯性使用人員能快捷簡單地進行操作。即時準確地獲得需要的計算的結果,充分降低了數字計算的難度和節約了時間,對人們的生活有一定的幫助。在課程設計中,系統開發平臺為Windows 2000XP,程序設計設計語言采用Visual C++,在程序設計中,采用了結構化與面向對象兩種解決問題的方法。

代碼片段和文件信息
//?MY.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“MY.h“
#include?“MYDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMYApp
BEGIN_MESSAGE_MAP(CMYApp?CWinApp)
//{{AFX_MSG_MAP(CMYApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CMYApp?construction
CMYApp::CMYApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CMYApp?object
CMYApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CMYApp?initialization
BOOL?CMYApp::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
CMYDlg?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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????114771??2012-05-10?17:57??VC計算器\MY\Debug\MY.exe
?????文件?????209896??2012-05-10?17:57??VC計算器\MY\Debug\MY.ilk
?????文件??????13813??2012-05-10?17:52??VC計算器\MY\Debug\MY.obj
?????文件????5567852??2012-05-10?17:52??VC計算器\MY\Debug\MY.pch
?????文件?????369664??2012-05-10?17:57??VC計算器\MY\Debug\MY.pdb
?????文件???????3112??2012-05-10?17:52??VC計算器\MY\Debug\MY.res
?????文件??????39550??2012-05-10?17:57??VC計算器\MY\Debug\MYDlg.obj
?????文件?????105769??2012-05-10?17:52??VC計算器\MY\Debug\StdAfx.obj
?????文件?????197632??2012-05-10?17:57??VC計算器\MY\Debug\vc60.idb
?????文件?????364544??2012-05-10?17:57??VC計算器\MY\Debug\vc60.pdb
?????文件??????36632??2012-05-10?14:21??VC計算器\MY\MY.APS
?????文件???????1831??2012-05-11?11:52??VC計算器\MY\MY.clw
?????文件???????2007??2012-05-09?17:43??VC計算器\MY\MY.cpp
?????文件???????4087??2012-05-09?17:43??VC計算器\MY\MY.dsp
?????文件????????512??2012-05-09?17:43??VC計算器\MY\MY.dsw
?????文件???????1280??2012-05-09?17:43??VC計算器\MY\MY.h
?????文件??????58368??2012-05-11?13:43??VC計算器\MY\MY.ncb
?????文件??????53760??2012-05-11?13:43??VC計算器\MY\MY.opt
?????文件????????504??2012-05-10?17:57??VC計算器\MY\MY.plg
?????文件???????6220??2012-05-10?14:21??VC計算器\MY\MY.rc
?????文件???????9112??2012-05-10?18:05??VC計算器\MY\MYDlg.cpp
?????文件???????1925??2012-05-10?16:33??VC計算器\MY\MYDlg.h
?????文件???????3507??2012-05-09?17:43??VC計算器\MY\ReadMe.txt
?????文件???????1078??2012-05-09?17:43??VC計算器\MY\res\MY.ico
?????文件????????394??2012-05-09?17:43??VC計算器\MY\res\MY.rc2
?????文件???????1462??2012-05-09?18:15??VC計算器\MY\resource.h
?????文件????????204??2012-05-09?17:43??VC計算器\MY\StdAfx.cpp
?????文件???????1054??2012-05-09?17:43??VC計算器\MY\StdAfx.h
?????目錄??????????0??2012-05-10?17:57??VC計算器\MY\Debug
?????目錄??????????0??2012-05-10?15:04??VC計算器\MY\Release
............此處省略6個文件信息
評論
共有 條評論