• 大小: 154KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-11
  • 语言: 其他
  • 标签: MFC  C++  

资源简介

代码暂支持多边形的交并差,若要支持圆弧,可将圆弧离散成线段

资源截图

代码片段和文件信息


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

#include “stdafx.h“
#include “TextPolygonInter.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))
{
TRACE0(“未能创建状态栏\n“);
return -1;      // 未能创建
}
m_wndStatusBar.SetIndicators(indicators sizeof(indicators)/sizeof(UINT));

// 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 消息处理程序


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-08-25 16:41  TextPolygonInter\
     目录           0  2018-08-21 10:47  TextPolygonInter\.vs\
     目录           0  2018-08-21 10:47  TextPolygonInter\.vs\TextPolygonInter\
     目录           0  2018-08-21 10:47  TextPolygonInter\.vs\TextPolygonInter\v14\
     文件       31232  2018-08-25 16:40  TextPolygonInter\.vs\TextPolygonInter\v14\.suo
     目录           0  2018-08-25 16:41  TextPolygonInter\TextPolygonInter\
     文件        1786  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\MainFrm.cpp
     文件         669  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\MainFrm.h
     文件        4970  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\ReadMe.txt
     文件      119444  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\TextPolygonInter.aps
     文件        4354  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\TextPolygonInter.cpp
     文件         570  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\TextPolygonInter.h
     文件       11968  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\TextPolygonInter.rc
     文件        6500  2018-08-21 10:46  TextPolygonInter\TextPolygonInter\TextPolygonInter.vcxproj
     文件        2696  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\TextPolygonInter.vcxproj.filters
     文件        2735  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\TextPolygonInterDoc.cpp
     文件         907  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\TextPolygonInterDoc.h
     文件       35068  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\TextPolygonInterView.cpp
     文件        4125  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\TextPolygonInterView.h
     目录           0  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\res\
     文件       67777  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\res\TextPolygonInter.ico
     文件         688  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\res\TextPolygonInter.rc2
     文件        4710  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\res\TextPolygonInterDoc.ico
     文件        1078  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\res\Toolbar.bmp
     文件         916  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\resource.h
     文件         149  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\stdafx.cpp
     文件        1578  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\stdafx.h
     文件         234  2018-08-21 10:45  TextPolygonInter\TextPolygonInter\targetver.h
     文件         994  2018-08-21 10:45  TextPolygonInter\TextPolygonInter.sln

评论

共有 条评论