基于MFC的计时器程序


这是一个基于MFC的计时器程序,结构简单明了,有详细注释,适合新手入门学习,能对MCF结构有清晰了解。
资源截图
代码片段和文件信息
// CdTimer.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “CdTimer.h“
#include “CdTimerDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCdTimerApp

BEGIN_MESSAGE_MAP(CCdTimerApp CWinApp)
//{{AFX_MSG_MAP(CCdTimerApp)
// 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()

/////////////////////////////////////////////////////////////////////////////
// CCdTimerApp construction

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

/////////////////////////////////////////////////////////////////////////////
// The one and only CCdTimerApp object

CCdTimerApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CCdTimerApp initialization

BOOL CCdTimerApp::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

CCdTimerDlg 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;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-02-27 11:03  计时器
     目录           0  2017-02-28 09:06  计时器CdTimer
     文件       22680  2017-02-27 11:13  计时器CdTimerCdTimer.aps
     文件        1539  2013-08-17 17:22  计时器CdTimerCdTimer.clw
     文件        2077  2013-08-16 10:01  计时器CdTimerCdTimer.cpp
     文件        4444  2013-08-16 23:13  计时器CdTimerCdTimer.dsp
     文件         539  2013-08-16 11:59  计时器CdTimerCdTimer.dsw
     文件        1335  2013-08-16 10:01  计时器CdTimerCdTimer.h
     文件       58368  2013-08-17 17:22  计时器CdTimerCdTimer.ncb
     文件       49664  2013-08-17 17:22  计时器CdTimerCdTimer.opt
     文件         563  2013-08-17 16:18  计时器CdTimerCdTimer.plg
     文件        6234  2013-08-17 11:24  计时器CdTimerCdTimer.rc
     文件    51597312  2017-02-28 09:06  计时器CdTimerCdTimer.sdf
     文件         880  2017-02-27 11:14  计时器CdTimerCdTimer.sln
     文件       14848  2017-02-28 09:06  计时器CdTimerCdTimer.suo
     文件        8062  2017-02-27 14:32  计时器CdTimerCdTimer.vcxproj
     文件        2314  2017-02-27 11:05  计时器CdTimerCdTimer.vcxproj.filters
     文件         143  2017-02-27 11:05  计时器CdTimerCdTimer.vcxproj.user
     文件        7106  2017-02-27 16:55  计时器CdTimerCdTimerDlg.cpp
     文件        1754  2013-08-17 15:22  计时器CdTimerCdTimerDlg.h
     目录           0  2017-02-27 16:57  计时器CdTimerDebug
     文件       33720  2017-02-27 16:55  计时器CdTimerDebugCL.read.1.tlog
     文件        1880  2017-02-27 16:55  计时器CdTimerDebugCL.write.1.tlog
     文件        2112  2017-02-27 14:37  计时器CdTimerDebugCdTimer.Build.CppClean.log
     文件       77824  2017-02-27 16:55  计时器CdTimerDebugCdTimer.exe
     文件         667  2017-02-27 14:37  计时器CdTimerDebugCdTimer.exe.embed.manifest
     文件         732  2017-02-27 14:37  计时器CdTimerDebugCdTimer.exe.embed.manifest.res
     文件         381  2017-02-27 16:55  计时器CdTimerDebugCdTimer.exe.intermediate.manifest
     文件     1016404  2017-02-27 16:55  计时器CdTimerDebugCdTimer.ilk
     文件          64  2017-02-27 16:57  计时器CdTimerDebugCdTimer.lastbuildstate
     文件        1005  2017-02-27 16:57  计时器CdTimerDebugCdTimer.log
............此处省略47个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)