資源簡介
梁友棟裁剪算法,本案例是修改清華大學出版社的書上案例,在窗口中裁剪直線段

代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“Test.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
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2505??2006-11-30?11:00??梁友棟-直線裁剪算法\MainFrm.cpp
?????文件???????1581??2006-11-30?11:00??梁友棟-直線裁剪算法\MainFrm.h
?????文件???????4263??2006-11-30?11:00??梁友棟-直線裁剪算法\ReadMe.txt
?????文件???????1327??2012-05-18?21:59??梁友棟-直線裁剪算法\resource.h
?????文件????????206??2006-11-30?11:00??梁友棟-直線裁剪算法\StdAfx.cpp
?????文件???????1054??2006-11-30?11:00??梁友棟-直線裁剪算法\StdAfx.h
?????文件???????1864??2012-05-19?00:05??梁友棟-直線裁剪算法\Test.clw
?????文件???????4220??2008-06-28?10:35??梁友棟-直線裁剪算法\Test.cpp
?????文件??????51712??2012-05-19?00:09??梁友棟-直線裁剪算法\Test.opt
?????文件????????531??2006-11-30?11:08??梁友棟-直線裁剪算法\Test.dsw
?????文件???????1334??2006-11-30?11:00??梁友棟-直線裁剪算法\Test.h
?????文件???????4579??2012-05-19?00:09??梁友棟-直線裁剪算法\Test.dsp
?????文件????????242??2012-05-19?00:08??梁友棟-直線裁剪算法\Test.plg
?????文件???????1702??2006-11-30?11:00??梁友棟-直線裁剪算法\TestDoc.cpp
?????文件???????1453??2006-11-30?11:00??梁友棟-直線裁剪算法\TestDoc.h
?????文件???????2205??2007-12-16?16:25??梁友棟-直線裁剪算法\TestView.h
?????文件??????20447??2012-05-16?21:37??梁友棟-直線裁剪算法\Debug\MainFrm.obj
?????文件?????106090??2012-05-16?21:37??梁友棟-直線裁剪算法\Debug\StdAfx.obj
?????文件?????782404??2012-05-19?00:07??梁友棟-直線裁剪算法\Debug\Test.exe
?????文件?????365548??2012-05-19?00:07??梁友棟-直線裁剪算法\Debug\Test.ilk
?????文件??????23673??2012-05-16?21:37??梁友棟-直線裁剪算法\Debug\Test.obj
?????文件????5489164??2012-05-16?21:37??梁友棟-直線裁剪算法\Debug\Test.pch
?????文件?????443392??2012-05-19?00:07??梁友棟-直線裁剪算法\Debug\Test.pdb
?????文件??????15150??2012-05-16?21:37??梁友棟-直線裁剪算法\Debug\TestDoc.obj
?????文件?????205824??2012-05-19?00:08??梁友棟-直線裁剪算法\Debug\vc60.idb
?????文件?????364544??2012-05-18?22:45??梁友棟-直線裁剪算法\Debug\vc60.pdb
?????文件??????34818??2012-05-18?22:45??梁友棟-直線裁剪算法\Debug\TestView.obj
?????文件?????533724??2012-05-19?00:07??梁友棟-直線裁剪算法\Debug\Test.res
?????文件?????202556??2007-12-16?16:13??梁友棟-直線裁剪算法\res\liao.bmp
?????文件???????1078??2006-12-17?09:39??梁友棟-直線裁剪算法\res\SCISSORS.ICO
............此處省略14個文件信息
- 上一篇:學生成績管理系統C++附報告
- 下一篇:Linux軟件工程師(C語言)實用教程_.
評論
共有 條評論