资源简介
运用MFC开发,绘制基本图形,还可选择是否填充,可选择是否画网格
代码片段和文件信息
// Draw2.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “Draw2.h“
#include “MainFrm.h“
#include “Draw2Doc.h“
#include “Draw2View.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDraw2App
BEGIN_MESSAGE_MAP(CDraw2App CWinApp)
//{{AFX_MSG_MAP(CDraw2App)
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()
/////////////////////////////////////////////////////////////////////////////
// CDraw2App construction
CDraw2App::CDraw2App()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CDraw2App object
CDraw2App theApp;
/////////////////////////////////////////////////////////////////////////////
// CDraw2App initialization
BOOL CDraw2App::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(CDraw2Doc)
RUNTIME_CLASS(CMainframe) // main SDI frame window
RUNTIME_CLASS(CDraw2View));
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;
}
/////////
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2195516 2013-10-07 17:02 Draw2\Debug\Draw2.exe
文件 2530992 2013-10-07 17:02 Draw2\Debug\Draw2.ilk
文件 21435 2013-10-07 17:02 Draw2\Debug\Draw2.obj
文件 5720768 2013-10-07 17:02 Draw2\Debug\Draw2.pch
文件 3589120 2013-10-07 17:02 Draw2\Debug\Draw2.pdb
文件 14872 2013-10-07 17:02 Draw2\Debug\Draw2.res
文件 13209 2013-10-07 17:02 Draw2\Debug\Draw2Doc.obj
文件 29612 2013-10-07 17:02 Draw2\Debug\Draw2View.obj
文件 18452 2013-10-07 17:02 Draw2\Debug\MainFrm.obj
文件 105372 2013-10-07 17:02 Draw2\Debug\StdAfx.obj
文件 312320 2013-10-07 17:02 Draw2\Debug\vc60.idb
文件 372736 2013-10-07 17:02 Draw2\Debug\vc60.pdb
文件 28516 2013-10-07 16:48 Draw2\Draw2.aps
文件 2398 2013-10-07 16:56 Draw2\Draw2.clw
文件 4191 2013-09-12 11:56 Draw2\Draw2.cpp
文件 4534 2013-09-12 11:56 Draw2\Draw2.dsp
文件 533 2013-09-12 11:56 Draw2\Draw2.dsw
文件 1345 2013-09-12 11:56 Draw2\Draw2.h
文件 91136 2013-10-07 20:26 Draw2\Draw2.ncb
文件 48640 2013-10-07 20:26 Draw2\Draw2.opt
文件 1673 2013-10-07 17:02 Draw2\Draw2.plg
文件 12031 2013-09-17 12:27 Draw2\Draw2.rc
文件 1722 2013-09-12 11:56 Draw2\Draw2Doc.cpp
文件 1464 2013-09-12 11:56 Draw2\Draw2Doc.h
文件 5261 2013-09-17 12:29 Draw2\Draw2View.cpp
文件 2042 2013-09-17 12:28 Draw2\Draw2View.h
文件 2483 2013-09-12 12:17 Draw2\MainFrm.cpp
文件 1440 2013-09-12 12:17 Draw2\MainFrm.h
文件 4287 2013-09-12 11:56 Draw2\ReadMe.txt
文件 1078 2013-09-12 11:56 Draw2\res\Draw2.ico
............此处省略12个文件信息
- 上一篇:VC++鼠标画直线程序
- 下一篇:C++简单获取鼠标当前坐标
评论
共有 条评论