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

资源简介

画多边形C++算法源代码 模拟MsPainter画图程序中的画多边形 VC++6.0实现

资源截图

代码片段和文件信息

// MainFrm.cpp : implementation of the CMainframe class
//

#include “stdafx.h“
#include “t.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


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

     文件       2502  2006-08-05 23:11  画多边形\MainFrm.cpp

     文件       1581  2006-08-05 23:11  画多边形\MainFrm.h

     文件       4191  2006-08-05 23:11  画多边形\ReadMe.txt

     文件        484  2006-08-05 23:11  画多边形\Resource.h

     文件        203  2006-08-05 23:11  画多边形\StdAfx.cpp

     文件       1054  2006-08-05 23:11  画多边形\StdAfx.h

     文件      28200  2006-08-05 23:11  画多边形\t.aps

     文件       2151  2006-08-05 23:54  画多边形\t.clw

     文件       4119  2006-08-05 23:11  画多边形\t.cpp

     文件       4450  2006-08-05 23:11  画多边形\t.dsp

     文件        527  2006-08-05 23:45  画多边形\t.dsw

     文件       1301  2006-08-05 23:11  画多边形\t.h

     文件      74752  2006-08-06 09:37  画多边形\t.ncb

     文件      53760  2006-08-06 09:37  画多边形\t.opt

     文件        893  2006-08-06 09:14  画多边形\t.plg

     文件      10468  2006-08-05 23:11  画多边形\t.rc

     文件       1642  2006-08-05 23:11  画多边形\tDoc.cpp

     文件       1420  2006-08-05 23:11  画多边形\tDoc.h

     文件       3843  2006-08-06 09:37  画多边形\tView.cpp

     文件       1951  2006-08-05 23:53  画多边形\tView.h

    ..A.SHR         8  2007-01-03 17:40  画多边形\Desktop_.ini

     文件     118822  2007-01-03 21:36  画多边形\Debug\t.exe

    ..A.SHR         8  2007-01-03 17:40  画多边形\Debug\Desktop_.ini

     文件       1078  2006-08-05 23:11  画多边形\res\t.ico

     文件        393  2006-08-05 23:11  画多边形\res\t.rc2

     文件       1078  2006-08-05 23:11  画多边形\res\tDoc.ico

     文件       1078  2006-08-05 23:11  画多边形\res\Toolbar.bmp

    ..A.SHR         8  2007-01-03 17:40  画多边形\res\Desktop_.ini

     目录          0  2007-03-19 19:43  画多边形\Debug

     目录          0  2007-03-19 19:43  画多边形\res

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

评论

共有 条评论