資源簡介
《指針式時鐘》問題分析,功能分析
(1)正確顯示系統時鐘;
(2)能準確定位時鐘刻度和時分秒針的位置;
(3)能隨窗口大小的變化而變化。
運行效果圖:http://blog.csdn.net/dxzysk/article/details/9904461

代碼片段和文件信息
//?Clock.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Clock.h“
#include?“MainFrm.h“
#include?“ClockDoc.h“
#include?“ClockView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CClockApp
BEGIN_MESSAGE_MAP(CClockApp?CWinApp)
//{{AFX_MSG_MAP(CClockApp)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
//?Standard?file?based?document?commands
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
//?Standard?print?setup?command
ON_COMMAND(ID_FILE_PRINT_SETUP?CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CClockApp?construction
CClockApp::CClockApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CClockApp?object
CClockApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CClockApp?initialization
BOOL?CClockApp::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
//?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“));
LoadStdProfileSettings();??//?Load?standard?INI?file?options?(including?MRU)
//?Register?the?application‘s?document?templates.??Document?templates
//??serve?as?the?connection?between?documents?frame?windows?and?views.
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CClockDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CClockView));
AddDocTemplate(pDocTemplate);
//?Parse?command?line?for?standard?shell?commands?DDE?file?open
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?Dispatch?commands?specified?on?the?command?line
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return?TRUE;
}
/////////
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????28984??2013-07-03?18:51??Clock\Clock.aps
?????文件???????2175??2013-07-03?19:04??Clock\Clock.clw
?????文件???????4191??2013-07-03?18:17??Clock\Clock.cpp
?????文件???????4534??2013-07-03?18:17??Clock\Clock.dsp
?????文件????????518??2013-07-03?18:17??Clock\Clock.dsw
?????文件???????1345??2013-07-03?18:17??Clock\Clock.h
?????文件??????74752??2013-07-03?20:12??Clock\Clock.ncb
?????文件??????49664??2013-07-03?20:12??Clock\Clock.opt
?????文件????????987??2013-07-03?20:11??Clock\Clock.plg
?????文件??????10536??2013-07-03?18:17??Clock\Clock.rc
?????文件???????1722??2013-07-03?18:17??Clock\ClockDoc.cpp
?????文件???????1464??2013-07-03?18:17??Clock\ClockDoc.h
?????文件???????5167??2013-07-03?20:11??Clock\ClockView.cpp
?????文件???????1969??2013-07-03?18:38??Clock\ClockView.h
?????文件???????2583??2013-07-03?20:04??Clock\MainFrm.cpp
?????文件???????1581??2013-07-03?18:17??Clock\MainFrm.h
?????文件???????4287??2013-07-03?18:17??Clock\ReadMe.txt
?????文件????????492??2013-07-03?18:17??Clock\Resource.h
?????文件????????207??2013-07-03?18:17??Clock\StdAfx.cpp
?????文件???????1054??2013-07-03?18:17??Clock\StdAfx.h
?????文件?????118853??2013-07-03?20:11??Clock\Debug\Clock.exe
?????文件?????348060??2013-07-03?20:11??Clock\Debug\Clock.ilk
?????文件??????23182??2013-07-03?18:42??Clock\Debug\Clock.obj
?????文件????5497000??2013-07-03?18:18??Clock\Debug\Clock.pch
?????文件?????500736??2013-07-03?20:11??Clock\Debug\Clock.pdb
?????文件???????7244??2013-07-03?18:18??Clock\Debug\Clock.res
?????文件??????14958??2013-07-03?18:18??Clock\Debug\ClockDoc.obj
?????文件??????27910??2013-07-03?20:11??Clock\Debug\ClockView.obj
?????文件??????19984??2013-07-03?20:05??Clock\Debug\MainFrm.obj
?????文件?????105892??2013-07-03?18:18??Clock\Debug\StdAfx.obj
............此處省略12個文件信息
- 上一篇:VC++ 大魚吃小魚游戲源碼
- 下一篇:dev c++中文安裝包
評論
共有 條評論