資源簡介
這是一個簡易圖形編輯器,可實現一些繪圖的簡單功能,可繪矩形,直線,橢圓,隨手畫線,橡皮擦等功能

代碼片段和文件信息
//?homework.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“homework.h“
#include?“MainFrm.h“
#include?“homeworkDoc.h“
#include?“homeworkView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CHomeworkApp
BEGIN_MESSAGE_MAP(CHomeworkApp?CWinApp)
//{{AFX_MSG_MAP(CHomeworkApp)
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()
/////////////////////////////////////////////////////////////////////////////
//?CHomeworkApp?construction
CHomeworkApp::CHomeworkApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CHomeworkApp?object
CHomeworkApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CHomeworkApp?initialization
BOOL?CHomeworkApp::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(CHomeworkDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CHomeworkView));
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->Up
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????326??2008-11-22?19:47??homework\arrow.cur
?????文件????????326??2008-11-22?19:47??homework\arrowcop.cur
?????文件?????127050??2009-08-09?20:59??homework\Debug\homework.exe
?????文件???????2472??2009-08-09?21:01??homework\homework.clw
?????文件???????4245??2008-11-22?18:30??homework\homework.cpp
?????文件???????4920??2008-11-22?19:50??homework\homework.dsp
?????文件????????524??2008-11-22?18:30??homework\homework.dsw
?????文件???????1378??2008-11-22?18:30??homework\homework.h
?????文件??????13041??2009-08-09?20:58??homework\homework.rc
?????文件???????1782??2008-11-22?18:30??homework\homeworkDoc.cpp
?????文件???????1497??2008-11-22?18:30??homework\homeworkDoc.h
?????文件???????8480??2009-08-09?20:46??homework\homeworkView.cpp
?????文件???????2686??2008-11-22?19:55??homework\homeworkView.h
?????文件???????2509??2008-11-22?18:30??homework\MainFrm.cpp
?????文件???????1581??2008-11-22?18:30??homework\MainFrm.h
?????文件????????326??2009-08-09?20:50??homework\nodrop.cur
?????文件????????326??2008-11-22?19:47??homework\res\cursor1.cur
?????文件???????1078??2008-11-22?18:30??homework\res\homework.ico
?????文件????????400??2008-11-22?18:30??homework\res\homework.rc2
?????文件???????1078??2008-11-22?18:30??homework\res\homeworkDoc.ico
?????文件????????326??2008-11-22?19:47??homework\res\nodrop1.cur
?????文件???????1078??2008-11-22?18:30??homework\res\Toolbar.bmp
?????文件???????1102??2009-08-09?20:58??homework\resource.h
?????文件????????210??2008-11-22?18:30??homework\StdAfx.cpp
?????文件???????1054??2008-11-22?18:30??homework\StdAfx.h
?????目錄??????????0??2009-08-09?21:02??homework\Debug
?????目錄??????????0??2009-08-09?20:59??homework\res
?????目錄??????????0??2009-08-09?21:02??homework
-----------?---------??----------?-----??----
???????????????179795????????????????????28
............此處省略1個文件信息
- 上一篇:西南交大程序設計綜合實驗源代碼c語言版
- 下一篇:后綴表達式求值
評論
共有 條評論