資源簡(jiǎn)介
簡(jiǎn)單的MFC入門(mén)繪圖程序,可以實(shí)現(xiàn)Window環(huán)境下自帶繪圖軟件的一些基本功能,幫助大家學(xué)習(xí)、入門(mén)MFC

代碼片段和文件信息
//?GRAPHIC.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“GRAPHIC.h“
#include?“MainFrm.h“
#include?“GRAPHICDoc.h“
#include?“GRAPHICView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CGRAPHICApp
BEGIN_MESSAGE_MAP(CGRAPHICApp?CWinApp)
//{{AFX_MSG_MAP(CGRAPHICApp)
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()
/////////////////////////////////////////////////////////////////////////////
//?CGRAPHICApp?construction
CGRAPHICApp::CGRAPHICApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CGRAPHICApp?object
CGRAPHICApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CGRAPHICApp?initialization
BOOL?CGRAPHICApp::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(CGRAPHICDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CGRAPHICView));
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();
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????文件????3679232??2010-01-29?10:04??GRAPHIC\Debug\GRAPHIC.bsc
?????文件?????118876??2010-01-29?10:04??GRAPHIC\Debug\GRAPHIC.exe
?????文件?????479108??2010-01-29?10:04??GRAPHIC\Debug\GRAPHIC.ilk
?????文件??????23267??2010-01-29?09:14??GRAPHIC\Debug\GRAPHIC.obj
?????文件????6944108??2010-01-28?17:50??GRAPHIC\Debug\GRAPHIC.pch
?????文件?????582656??2010-01-29?10:04??GRAPHIC\Debug\GRAPHIC.pdb
?????文件???????7728??2010-01-29?09:49??GRAPHIC\Debug\GRAPHIC.res
?????文件??????????0??2010-01-29?09:14??GRAPHIC\Debug\GRAPHIC.sbr
?????文件??????15054??2010-01-28?17:50??GRAPHIC\Debug\GRAPHICDoc.obj
?????文件??????????0??2010-01-28?17:50??GRAPHIC\Debug\GRAPHICDoc.sbr
?????文件??????36646??2010-01-29?10:01??GRAPHIC\Debug\GRAPHICView.obj
?????文件??????????0??2010-01-29?10:01??GRAPHIC\Debug\GRAPHICView.sbr
?????文件??????20186??2010-01-29?09:05??GRAPHIC\Debug\MainFrm.obj
?????文件??????????0??2010-01-29?09:05??GRAPHIC\Debug\MainFrm.sbr
?????文件??????15895??2010-01-29?10:04??GRAPHIC\Debug\SettingDlg.obj
?????文件??????????0??2010-01-29?10:04??GRAPHIC\Debug\SettingDlg.sbr
?????文件?????105877??2010-01-28?17:50??GRAPHIC\Debug\StdAfx.obj
?????文件????1375043??2010-01-28?17:50??GRAPHIC\Debug\StdAfx.sbr
?????文件?????222208??2010-02-03?17:38??GRAPHIC\Debug\vc60.idb
?????文件?????372736??2010-01-29?10:04??GRAPHIC\Debug\vc60.pdb
?????文件??????45144??2010-01-29?09:49??GRAPHIC\GRAPHIC.APS
?????文件???????3101??2010-02-03?17:39??GRAPHIC\GRAPHIC.clw
?????文件???????4227??2010-01-28?10:58??GRAPHIC\GRAPHIC.cpp
?????文件???????4709??2010-01-28?18:21??GRAPHIC\GRAPHIC.dsp
?????文件????????522??2010-01-28?10:58??GRAPHIC\GRAPHIC.dsw
?????文件???????1367??2010-01-28?10:58??GRAPHIC\GRAPHIC.h
?????文件??????99328??2010-02-03?17:39??GRAPHIC\GRAPHIC.ncb
?????文件??????51712??2010-02-03?17:39??GRAPHIC\GRAPHIC.opt
?????文件???????1473??2010-01-29?10:04??GRAPHIC\GRAPHIC.plg
?????文件??????13026??2010-01-29?09:49??GRAPHIC\GRAPHIC.rc
............此處省略22個(gè)文件信息
- 上一篇:多人聊天室 C++
- 下一篇:基于MFC的計(jì)算器
評(píng)論
共有 條評(píng)論