资源简介
完整描述了在VC6.0环境下使用DDA算法画直线的程序
代码片段和文件信息
// MainFrm.cpp : implementation of the CMainframe class
//
#include “stdafx.h“
#include “图形学1.h“
#include “MainFrm.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMainframe
IMPLEMENT_DYNCREATE(CMainframe CframeWnd)
BEGIN_MESSAGE_MAP(CMainframe CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code !
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
static UINT indicators[] =
{
ID_SEPARATOR // status line indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};
/////////////////////////////////////////////////////////////////////////////
// CMainframe construction/destruction
CMainframe::CMainframe()
{
// TODO: add member initialization code here
}
CMainframe::~CMainframe()
{
}
int CMainframe::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CframeWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (!m_wndToolBar.CreateEx(this TBstyle_FLAT WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed to create toolbar\n“);
return -1; // fail to create
}
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators
sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed to create status bar\n“);
return -1; // fail to create
}
// TODO: Delete these three lines if you don‘t want the toolbar to
// be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
return 0;
}
BOOL CMainframe::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CframeWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CMainframe diagnostics
#ifdef _DEBUG
void CMainframe::AssertValid() const
{
CframeWnd::AssertValid();
}
void CMainframe::Dump(CDumpContext& dc) const
{
CframeWnd::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMainframe message handlers
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2881 2009-11-18 09:42 图形学\图形学1View.cpp
文件 1727 2009-11-18 09:02 图形学\图形学1View.h
文件 291328 2009-11-18 08:54 图形学\总结1.ppt
文件 19725 2009-11-18 09:42 图形学\Debug\MainFrm.obj
文件 105515 2009-11-18 09:42 图形学\Debug\StdAfx.obj
文件 214016 2009-11-18 09:42 图形学\Debug\vc60.idb
文件 364544 2009-11-18 09:42 图形学\Debug\vc60.pdb
文件 118838 2009-11-18 09:42 图形学\Debug\图形学1.exe
文件 302284 2009-11-18 09:42 图形学\Debug\图形学1.ilk
文件 22608 2009-11-18 09:42 图形学\Debug\图形学1.obj
文件 5511180 2009-11-18 09:42 图形学\Debug\图形学1.pch
文件 328704 2009-11-18 09:42 图形学\Debug\图形学1.pdb
文件 7244 2009-11-18 09:42 图形学\Debug\图形学1.res
文件 14392 2009-11-18 09:42 图形学\Debug\图形学1Doc.obj
文件 21194 2009-11-18 09:42 图形学\Debug\图形学1View.obj
文件 1078 2009-11-18 08:57 图形学\res\Toolbar.bmp
文件 1078 2009-11-18 08:57 图形学\res\图形学1.ico
文件 399 2009-11-18 08:57 图形学\res\图形学1.rc2
文件 1078 2009-11-18 08:57 图形学\res\图形学1Doc.ico
..A.SH. 8192 2009-12-12 15:05 图形学\res\Thumbs.db
文件 2508 2009-11-18 08:57 图形学\MainFrm.cpp
文件 1581 2009-11-18 08:57 图形学\MainFrm.h
文件 4307 2009-11-18 08:57 图形学\ReadMe.txt
文件 641 2009-11-18 09:05 图形学\Resource.h
文件 209 2009-11-18 08:57 图形学\StdAfx.cpp
文件 1054 2009-11-18 08:57 图形学\StdAfx.h
文件 43832 2009-11-18 09:05 图形学\图形学1.aps
文件 50176 2009-11-18 09:43 图形学\图形学1.ncb
文件 1860 2009-11-18 09:42 图形学\图形学1.plg
文件 2253 2009-11-18 09:02 图形学\图形学1.clw
............此处省略14个文件信息
- 上一篇:摄影测量后方交会、前方交会程序
- 下一篇:live555&RTSP;源码解析笔记
相关资源
- OpenCV直线检测程序 by浅墨
- 基于MFC的Cohen-Sutherland直线裁剪算法
- MFC画直线及简单图形
- 基于VC++6.0的绘图软件画直线曲线矩形
- 直线段的裁剪 vc++ MFC
-
ob
jectArx2017+AutoCAD2017+VS2015二次开发及 -
ob
jectARX将直线、圆弧、多段线(P - C++ 画直线、三角形、矩形、直线
- 计算机图形学(MFC)-直线段裁剪
- MFC鼠标拖动绘制直线绘制矩形C++
- c++ 直线裁剪、画矩形等(graphics)
- 基于MFC的画直线,矩形,椭圆改变线
- MFC基于对话框的交互式画图程序橡皮
- DDA、中点画线法、Bresenham算法
- 计算机图形学 Cohen- Sutherland直线段裁
- Hough变换 C 语言实现
- C++最小二乘法拟合直线
- 直线反走样算法
- DDA画线算法
- 用MFC画直线椭圆矩型可选择线条颜色
- 计算机图形学 直线裁剪算法
- HOUGH_LINE.cpp
- 基于openGl的画直线和三角形光栅化源
- 画图程序最新版 MFC/VC/VC++ 很多功能哦
- 计算机图形学直线段的扫描转换C++实
- 用C++模拟直线插补没有图形
- 利用VC++编写的直线圆弧插补的实现
- Bresenham直线算法的C++实现
- MFC单文档画图(直线矩形有注释)
- 二维区域图形裁剪
评论
共有 条评论