資源簡介
畫多邊形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個文件信息
評論
共有 條評論