• 大小: 11.1MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-06
  • 语言: C/C++
  • 标签: 多边形  c++  

资源简介

对一个用鼠标左击形成的多边形,画一个最小的矩形,在这个矩形内用有效边表填充算法对多边形填充。 建议 请用VS2008运行。

资源截图

代码片段和文件信息

// MainFrm.cpp : CMainframe 类的实现
//

#include “stdafx.h“
#include “Scanedge.h“

#include “MainFrm.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CMainframe

IMPLEMENT_DYNCREATE(CMainframe CframeWnd)

BEGIN_MESSAGE_MAP(CMainframe CframeWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()

static UINT indicators[] =
{
ID_SEPARATOR           // 状态行指示器
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};


// CMainframe 构造/析构

CMainframe::CMainframe()
{
// TODO: 在此添加成员初始化代码
}

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(“未能创建工具栏\n“);
return -1;      // 未能创建
}

if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators
  sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“未能创建状态栏\n“);
return -1;      // 未能创建
}

// TODO: 如果不需要工具栏可停靠,则删除这三行
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: 在此处通过修改
//  CREATESTRUCT cs 来修改窗口类或样式

return TRUE;
}


// CMainframe 诊断

#ifdef _DEBUG
void CMainframe::AssertValid() const
{
CframeWnd::AssertValid();
}

void CMainframe::Dump(CDumpContext& dc) const
{
CframeWnd::Dump(dc);
}

#endif //_DEBUG


// CMainframe 消息处理程序




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

     文件     139776  2009-04-20 19:32  Scanedge\Scanedge\Debug\Scanedge.exe

     文件    1390752  2009-04-20 19:32  Scanedge\Scanedge\Debug\Scanedge.ilk

     文件    3296256  2009-04-20 19:32  Scanedge\Scanedge\Debug\Scanedge.pdb

     文件      50688  2009-04-22 21:04  Scanedge\Scanedge\Release\Scanedge.exe

     文件    2796544  2009-04-22 21:04  Scanedge\Scanedge\Release\Scanedge.pdb

     文件       1798  2009-02-25 20:30  Scanedge\Scanedge\Scanedge\MainFrm.cpp

     文件        655  2009-02-25 20:30  Scanedge\Scanedge\Scanedge\MainFrm.h

     文件       3326  2009-02-25 20:29  Scanedge\Scanedge\Scanedge\ReadMe.txt

     文件       7624  2009-04-22 21:04  Scanedge\Scanedge\Scanedge\Release\BuildLog.htm

     文件      37994  2009-04-20 19:34  Scanedge\Scanedge\Scanedge\Release\MainFrm.obj

     文件         67  2009-04-22 21:04  Scanedge\Scanedge\Scanedge\Release\mt.dep

     文件       1110  2009-04-22 21:04  Scanedge\Scanedge\Scanedge\Release\Scanedge.exe.intermediate.manifest

     文件      44069  2009-04-20 19:34  Scanedge\Scanedge\Scanedge\Release\Scanedge.obj

     文件   23658496  2009-04-20 19:34  Scanedge\Scanedge\Scanedge\Release\Scanedge.pch

     文件      27948  2009-04-20 19:34  Scanedge\Scanedge\Scanedge\Release\Scanedge.res

     文件      30012  2009-04-20 19:34  Scanedge\Scanedge\Scanedge\Release\ScanedgeDoc.obj

     文件      52502  2009-04-22 21:04  Scanedge\Scanedge\Scanedge\Release\ScanedgeView.obj

     文件    2353225  2009-04-20 19:34  Scanedge\Scanedge\Scanedge\Release\stdafx.obj

     文件     420864  2009-04-22 21:04  Scanedge\Scanedge\Scanedge\Release\vc90.idb

     文件    1683456  2009-04-22 21:04  Scanedge\Scanedge\Scanedge\Release\vc90.pdb

     文件      21630  2005-12-08 14:56  Scanedge\Scanedge\Scanedge\res\Scanedge.ico

     文件        364  2009-02-25 20:30  Scanedge\Scanedge\Scanedge\res\Scanedge.rc2

     文件       1078  2005-12-08 14:56  Scanedge\Scanedge\Scanedge\res\ScanedgeDoc.ico

     文件       1078  2005-12-08 14:56  Scanedge\Scanedge\Scanedge\res\Toolbar.bmp

     文件        633  2009-02-25 21:01  Scanedge\Scanedge\Scanedge\resource.h

     文件      66768  2009-02-25 21:01  Scanedge\Scanedge\Scanedge\Scanedge.aps

     文件       3198  2009-02-25 20:29  Scanedge\Scanedge\Scanedge\Scanedge.cpp

     文件        480  2009-02-25 20:29  Scanedge\Scanedge\Scanedge\Scanedge.h

     文件      10631  2009-02-25 21:01  Scanedge\Scanedge\Scanedge\Scanedge.rc

     文件       5943  2009-04-22 19:50  Scanedge\Scanedge\Scanedge\Scanedge.vcproj

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

评论

共有 条评论