• 大小: 36KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-05
  • 语言: C/C++
  • 标签:

资源简介

C++ MFC 绘画圆源代码,实现用鼠标绘画圆

资源截图

代码片段和文件信息

// 001.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “001.h“

#include “MainFrm.h“
#include “001Doc.h“
#include “001View.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMy001App

BEGIN_MESSAGE_MAP(CMy001App CWinApp)
//{{AFX_MSG_MAP(CMy001App)
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()

/////////////////////////////////////////////////////////////////////////////
// CMy001App construction

CMy001App::CMy001App()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CMy001App object

CMy001App theApp;

/////////////////////////////////////////////////////////////////////////////
// CMy001App initialization

BOOL CMy001App::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(CMy001Doc)
RUNTIME_CLASS(CMainframe)       // main SDI frame window
RUNTIME_CLASS(CMy001View));
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;
}


/////////////////

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2010-05-28 00:26  圆\
     文件       28188  2010-05-28 00:26  圆\001.aps
     文件        2169  2010-05-28 00:26  圆\001.clw
     文件        4183  2010-05-28 00:26  圆\001.cpp
     文件        4492  2010-05-28 00:26  圆\001.dsp
     文件         514  2010-05-28 00:26  圆\001.dsw
     文件        1333  2010-05-28 00:26  圆\001.h
     文件       74752  2010-05-28 00:26  圆\001.ncb
     文件       49664  2010-05-28 00:26  圆\001.opt
     文件         555  2010-05-28 00:26  圆\001.plg
     文件       11353  2010-05-28 00:26  圆\001.rc
     文件        1716  2010-05-28 00:26  圆\001Doc.cpp
     文件        1456  2010-05-28 00:26  圆\001Doc.h
     文件        3640  2010-05-28 00:26  圆\001View.cpp
     文件        1987  2010-05-28 00:26  圆\001View.h
     文件        2504  2010-05-28 00:26  圆\MainFrm.cpp
     文件        1581  2010-05-28 00:26  圆\MainFrm.h
     文件        4253  2010-05-28 00:26  圆\ReadMe.txt
     目录           0  2010-05-28 00:26  圆\res\
     文件         684  2010-05-28 00:26  圆\resource.h
     文件        1078  2010-05-28 00:26  圆\res\001.ico
     文件         395  2010-05-28 00:26  圆\res\001.rc2
     文件        1078  2010-05-28 00:26  圆\res\001Doc.ico
     文件        1078  2010-05-28 00:26  圆\res\Toolbar.bmp
     文件         205  2010-05-28 00:26  圆\StdAfx.cpp
     文件        1054  2010-05-28 00:26  圆\StdAfx.h

评论

共有 条评论

相关资源