資源簡介
一個很好的柵欄填充的源碼,對圖形學算法的學習研究有很大的幫助,程序寫的見解清晰,方便閱讀,值得看一看
代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“柵欄填充.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
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????118841??2009-03-23?18:22??柵欄填充\Debug\柵欄填充.exe
?????文件???????1333??2009-03-21?15:39??柵欄填充\lsj_Fence.h
?????文件???????1135??2009-03-20?10:48??柵欄填充\lsj_line.h
?????文件???????4404??2009-03-21?14:36??柵欄填充\lsj_Point.h
?????文件???????2509??2009-03-21?12:21??柵欄填充\MainFrm.cpp
?????文件???????1581??2009-03-21?12:21??柵欄填充\MainFrm.h
?????文件???????4317??2009-03-21?12:21??柵欄填充\ReadMe.txt
?????文件???????1078??2009-03-21?12:21??柵欄填充\res\Toolbar.bmp
?????文件???????1078??2009-03-21?12:21??柵欄填充\res\柵欄填充.ico
?????文件????????400??2009-03-21?12:21??柵欄填充\res\柵欄填充.rc2
?????文件???????1078??2009-03-21?12:21??柵欄填充\res\柵欄填充Doc.ico
?????文件????????492??2009-03-21?12:21??柵欄填充\Resource.h
?????文件????????210??2009-03-21?12:21??柵欄填充\StdAfx.cpp
?????文件???????1054??2009-03-21?12:21??柵欄填充\StdAfx.h
?????文件??????28480??2009-03-21?12:28??柵欄填充\柵欄填充.aps
?????文件???????2260??2009-03-21?12:50??柵欄填充\柵欄填充.clw
?????文件???????4161??2009-03-21?12:21??柵欄填充\柵欄填充.cpp
?????文件???????4617??2009-03-21?12:21??柵欄填充\柵欄填充.dsp
?????文件????????524??2009-03-21?12:21??柵欄填充\柵欄填充.dsw
?????文件???????1324??2009-03-21?12:21??柵欄填充\柵欄填充.h
?????文件??????66560??2009-03-23?18:23??柵欄填充\柵欄填充.ncb
?????文件??????49664??2009-03-23?18:23??柵欄填充\柵欄填充.opt
?????文件???????1153??2009-03-23?18:22??柵欄填充\柵欄填充.plg
?????文件??????10563??2009-03-21?12:21??柵欄填充\柵欄填充.rc
?????文件???????1680??2009-03-21?12:21??柵欄填充\柵欄填充Doc.cpp
?????文件???????1431??2009-03-21?12:21??柵欄填充\柵欄填充Doc.h
?????文件???????3913??2009-03-23?18:22??柵欄填充\柵欄填充View.cpp
?????文件???????2031??2009-03-21?13:33??柵欄填充\柵欄填充View.h
?????目錄??????????0??2009-06-05?13:21??柵欄填充\Debug
?????目錄??????????0??2009-06-05?13:20??柵欄填充\res
............此處省略4個文件信息
評論
共有 條評論