資源簡介
時分秒計時器數(shù)字電子課程設(shè)計,已成功仿真并焊接出實物。
代碼片段和文件信息
//?123.cpp?:?定義應(yīng)用程序的類行為。
//
#include?“stdafx.h“
#include?“afxwinappex.h“
#include?“afxdialogex.h“
#include?“123.h“
#include?“MainFrm.h“
#include?“ChildFrm.h“
#include?“123Doc.h“
#include?“123View.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CMy123App
BEGIN_MESSAGE_MAP(CMy123App?CWinAppEx)
ON_COMMAND(ID_APP_ABOUT?&CMy123App::OnAppAbout)
//?基于文件的標(biāo)準(zhǔn)文檔命令
ON_COMMAND(ID_FILE_NEW?&CWinAppEx::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?&CWinAppEx::OnFileOpen)
//?標(biāo)準(zhǔn)打印設(shè)置命令
ON_COMMAND(ID_FILE_PRINT_SETUP?&CWinAppEx::OnFilePrintSetup)
END_MESSAGE_MAP()
//?CMy123App?構(gòu)造
CMy123App::CMy123App()
{
m_bHiColorIcons?=?TRUE;
//?支持重新啟動管理器
m_dwRestartManagerSupportFlags?=?AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS;
#ifdef?_MANAGED
//?如果應(yīng)用程序是利用公共語言運行時支持(/clr)構(gòu)建的,則:
//?????1)?必須有此附加設(shè)置,“重新啟動管理器”支持才能正常工作。
//?????2)?在您的項目中,您必須按照生成順序向?System.Windows.Forms?添加引用。
System::Windows::Forms::Application::SetUnhandledExceptionMode(System::Windows::Forms::UnhandledExceptionMode::ThrowException);
#endif
//?TODO:?將以下應(yīng)用程序?ID?字符串替換為唯一的?ID?字符串;建議的字符串格式
//為?CompanyName.ProductName.SubProduct.VersionInformation
SetAppID(_T(“123.AppID.NoVersion“));
//?TODO:?在此處添加構(gòu)造代碼,
//?將所有重要的初始化放置在?InitInstance?中
}
//?唯一的一個?CMy123App?對象
CMy123App?theApp;
//?CMy123App?初始化
BOOL?CMy123App::InitInstance()
{
//?如果一個運行在?Windows?XP?上的應(yīng)用程序清單指定要
//?使用?ComCtl32.dll?版本?6?或更高版本來啟用可視化方式,
//則需要?InitCommonControlsEx()。否則,將無法創(chuàng)建窗口。
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?將它設(shè)置為包括所有要在應(yīng)用程序中使用的
//?公共控件類。
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinAppEx::InitInstance();
//?初始化?OLE?庫
if?(!AfxOleInit())
{
AfxMessageBox(IDP_OLE_INIT_FAILED);
return?FALSE;
}
AfxEnableControlContainer();
EnableTaskbarInteraction(FALSE);
//?使用?RichEdit?控件需要??AfxInitRichEdit2()
//?AfxInitRichEdit2();
//?標(biāo)準(zhǔn)初始化
//?如果未使用這些功能并希望減小
//?最終可執(zhí)行文件的大小,則應(yīng)移除下列
//?不需要的特定初始化例程
//?更改用于存儲設(shè)置的注冊表項
//?TODO:?應(yīng)適當(dāng)修改該字符串,
//?例如修改為公司或組織名
SetRegistryKey(_T(“應(yīng)用程序向?qū)傻谋镜貞?yīng)用程序“));
LoadStdProfileSettings(4);??//?加載標(biāo)準(zhǔn)?INI?文件選項(包括?MRU)
InitContextMenuManager();
InitKeyboardManager();
InitTooltipManager();
CMFCToolTipInfo?ttParams;
ttParams.m_bVislManagerTheme?=?TRUE;
theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL
RUNTIME_CLASS(CMFCToolTipCtrl)?&ttParams);
//?注冊應(yīng)用程序的文檔模板。文檔模板
//?將用作文檔、框架窗口和視圖之間的連接
CMultiDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CMultiDocTemplate(IDR_My123TYPE
RUNTIME_CLASS(CMy123Doc)
RUNTIME_CLASS(CChildframe)?//?自定義?MDI?子框架
RUNTIME_CLASS(CMy123View));
if?(!pDocTemplate)
return?FALSE;
AddDocTemplate(pDocTemplate);
//?創(chuàng)建主?MDI?框架窗口
CMainframe*?pMainframe?=?new?CMainframe;
if?(!pMainframe?||?!pMainframe->Loadframe(IDR_MAINframe))
{
delete?pMainframe;
return?FALSE;
}
m_pMainWnd?=?pMainframe;
//?僅當(dāng)具有后綴時才調(diào)用?DragAcceptFiles
//??在?MDI?應(yīng)用程序中,這應(yīng)在設(shè)置
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-04-23?19:30??123\
?????目錄???????????0??2014-04-23?19:30??123\123\
?????文件??????126908??2014-04-23?15:14??123\123\123.aps
?????文件????????5678??2014-04-23?08:38??123\123\123.cpp
?????文件?????????669??2014-04-22?18:49??123\123\123.h
?????文件???????26962??2014-04-23?15:14??123\123\123.rc
?????文件????????6414??2014-04-22?10:32??123\123\123.vcxproj
?????文件????????3076??2014-04-22?10:32??123\123\123.vcxproj.filters
?????文件?????????222??2014-04-21?17:11??123\123\123.vcxproj.user
?????文件????????2867??2014-04-23?09:13??123\123\123Doc.cpp
?????文件?????????940??2014-04-23?09:13??123\123\123Doc.h
?????文件????????5469??2014-04-23?19:18??123\123\123View.cpp
?????文件????????1395??2014-04-23?16:04??123\123\123View.h
?????文件?????????887??2014-04-21?17:01??123\123\ChildFrm.cpp
?????文件?????????519??2014-04-23?15:14??123\123\ChildFrm.h
?????文件???????????1??2009-08-31?02:32??123\123\ClassDiagram1.cd
?????目錄???????????0??2014-04-23?19:30??123\123\Debug\
?????文件?????????915??2014-04-21?17:02??123\123\Debug\123.exe.em
?????文件?????????980??2014-04-21?17:02??123\123\Debug\123.exe.em
?????文件?????????640??2014-04-23?19:18??123\123\Debug\123.exe.intermediate.manifest
?????文件??????????40??2014-04-23?19:18??123\123\Debug\123.lastbuildstate
?????文件????????2730??2014-04-23?19:18??123\123\Debug\123.log
?????文件??????223054??2014-04-23?16:04??123\123\Debug\123.obj
?????文件????33751040??2014-04-21?17:02??123\123\Debug\123.pch
?????文件???????85028??2014-04-23?15:16??123\123\Debug\123.res
?????文件??????225278??2014-04-23?16:00??123\123\Debug\123Doc.obj
?????文件??????215476??2014-04-23?19:18??123\123\Debug\123View.obj
?????文件?????????196??2014-04-21?17:02??123\123\Debug\123_manifest.rc
?????文件??????484552??2014-04-23?19:18??123\123\Debug\CL.read.1.tlog
?????文件??????140526??2014-04-23?19:18??123\123\Debug\CL.read.2.tlog
?????文件????????3814??2014-04-23?19:18??123\123\Debug\CL.write.1.tlog
............此處省略62個文件信息
評論
共有 條評論