• 大小: 7.27MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-14
  • 语言: C/C++
  • 标签: 计算器  

资源简介

VC++实现计算器,用MFC实现界面操作,

资源截图

代码片段和文件信息

// Calculator.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “Calculator.h“
#include “CalculatorDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CCalculatorApp

BEGIN_MESSAGE_MAP(CCalculatorApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()


// CCalculatorApp construction

CCalculatorApp::CCalculatorApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}


// The one and only CCalculatorApp object

CCalculatorApp theApp;


// CCalculatorApp initialization

BOOL CCalculatorApp::InitInstance()
{
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles.  Otherwise any window creation will fail.
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::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
// Change the registry key under which our settings are stored
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));

CCalculatorDlg dlg;
m_pMainWnd = &dlg;
INT_PTR 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;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      59888  2009-01-16 15:23  Calculator\Calculator\Calculator.aps

     文件       2136  2009-01-15 19:55  Calculator\Calculator\Calculator.cpp

     文件        528  2009-01-15 19:55  Calculator\Calculator\Calculator.h

     文件       6300  2009-01-16 15:23  Calculator\Calculator\Calculator.rc

     文件       5788  2009-01-15 22:17  Calculator\Calculator\Calculator.vcproj

     文件       1407  2009-01-16 15:32  Calculator\Calculator\Calculator.vcproj.ee-PC.ee.user

     文件      13823  2009-01-16 15:30  Calculator\Calculator\CalculatorDlg.cpp

     文件       2649  2009-01-16 15:12  Calculator\Calculator\CalculatorDlg.h

     文件      10720  2009-01-16 15:30  Calculator\Calculator\Debug\BuildLog.htm

     文件        940  2009-01-16 09:46  Calculator\Calculator\Debug\Calculator.exe.embed.manifest

     文件       1004  2009-01-16 09:46  Calculator\Calculator\Debug\Calculator.exe.embed.manifest.res

     文件        888  2009-01-16 15:30  Calculator\Calculator\Debug\Calculator.exe.intermediate.manifest

     文件      21041  2009-01-16 15:13  Calculator\Calculator\Debug\Calculator.obj

     文件   13500416  2009-01-16 09:46  Calculator\Calculator\Debug\Calculator.pch

     文件      24340  2009-01-16 15:24  Calculator\Calculator\Debug\Calculator.res

     文件      78102  2009-01-16 15:30  Calculator\Calculator\Debug\CalculatorDlg.obj

     文件       3511  2009-01-16 13:28  Calculator\Calculator\Debug\Cal_data.obj

     文件       3339  2009-01-16 13:28  Calculator\Calculator\Debug\Display.obj

     文件         67  2009-01-16 15:30  Calculator\Calculator\Debug\mt.dep

     文件     270222  2009-01-16 09:46  Calculator\Calculator\Debug\stdafx.obj

     文件     707584  2009-01-16 15:30  Calculator\Calculator\Debug\vc80.idb

     文件     700416  2009-01-16 15:30  Calculator\Calculator\Debug\vc80.pdb

     文件       4093  2009-01-15 19:55  Calculator\Calculator\ReadMe.txt

     文件      21630  2005-08-12 16:37  Calculator\Calculator\res\Calculator.ico

     文件        401  2009-01-15 19:55  Calculator\Calculator\res\Calculator.rc2

     文件       1731  2009-01-15 20:07  Calculator\Calculator\resource.h

     文件        210  2009-01-15 19:55  Calculator\Calculator\stdafx.cpp

     文件       2864  2009-01-15 19:55  Calculator\Calculator\stdafx.h

     文件   18549760  2009-01-16 15:32  Calculator\Calculator.ncb

     文件        895  2009-01-15 19:55  Calculator\Calculator.sln

............此处省略12个文件信息

评论

共有 条评论