VC++鼠标画直线程序


完成了当鼠标按下确定起始点,鼠标抬起完成画线
资源截图
代码片段和文件信息
// Draw.cpp : Defines the class behaviors for the application.
//

#include “stdafx.h“
#include “Draw.h“

#include “MainFrm.h“
#include “DrawDoc.h“
#include “DrawView.h“

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

/////////////////////////////////////////////////////////////////////////////
// CDrawApp

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

/////////////////////////////////////////////////////////////////////////////
// CDrawApp construction

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

/////////////////////////////////////////////////////////////////////////////
// The one and only CDrawApp object

CDrawApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CDrawApp initialization

BOOL CDrawApp::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(CDrawDoc)
RUNTIME_CLASS(CMainframe)       // main SDI frame window
RUNTIME_CLASS(CDrawView));
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;
}


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

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     118865  2010-02-28 09:49  DrawDebugDraw.exe

     文件     314912  2010-02-28 09:49  DrawDebugDraw.ilk

     文件      23014  2010-02-28 09:49  DrawDebugDraw.obj

     文件    6881504  2010-02-28 09:49  DrawDebugDraw.pch

     文件     459776  2010-02-28 09:49  DrawDebugDraw.pdb

     文件       8516  2010-02-28 09:49  DrawDebugDraw.res

     文件       6068  2010-02-28 09:49  DrawDebugDraw.sbr

     文件      14794  2010-02-28 09:49  DrawDebugDrawDoc.obj

     文件       2771  2010-02-28 09:49  DrawDebugDrawDoc.sbr

     文件      24050  2010-02-28 09:49  DrawDebugDrawView.obj

     文件       5330  2010-02-28 09:49  DrawDebugDrawView.sbr

     文件      21085  2010-02-28 09:49  DrawDebugMainFrm.obj

     文件       3595  2010-02-28 09:49  DrawDebugMainFrm.sbr

     文件     105791  2010-02-28 09:49  DrawDebugStdAfx.obj

     文件    1375019  2010-02-28 09:49  DrawDebugStdAfx.sbr

     文件     205824  2010-02-28 09:49  DrawDebugvc60.idb

     文件     364544  2010-02-28 09:49  DrawDebugvc60.pdb

     文件      29988  2005-05-24 05:44  DrawDraw.aps

     文件       2282  2005-05-24 05:56  DrawDraw.clw

     文件       4173  2005-05-01 06:31  DrawDraw.cpp

     文件       4582  2005-05-02 17:28  DrawDraw.dsp

     文件        533  2005-05-01 06:31  DrawDraw.dsw

     文件       1334  2005-05-01 06:31  DrawDraw.h

     文件      91136  2010-02-28 09:50  DrawDraw.ncb

     文件      64000  2010-02-28 09:50  DrawDraw.opt

     文件       1137  2010-02-28 09:49  DrawDraw.plg

     文件      11667  2005-05-02 16:51  DrawDraw.rc

     文件       1702  2005-05-01 06:31  DrawDrawDoc.cpp

     文件       1453  2005-05-01 06:31  DrawDrawDoc.h

     文件       4844  2010-02-28 09:49  DrawDrawView.cpp

............此处省略18个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)