資源簡介
在MFC平臺里,以鼠標單擊的點作為控制頂點繪制出最高次數為三次的B樣條曲線,同時繪制出控制曲線。有注釋。

代碼片段和文件信息
//?Bspline.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Bspline.h“
#include?“MainFrm.h“
#include?“BsplineDoc.h“
#include?“BsplineView.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CBsplineApp
BEGIN_MESSAGE_MAP(CBsplineApp?CWinApp)
//{{AFX_MSG_MAP(CBsplineApp)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
//?Standard?file?based?document?commands
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
//?Standard?print?setup?command
ON_COMMAND(ID_FILE_PRINT_SETUP?CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CBsplineApp?construction
CBsplineApp::CBsplineApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CBsplineApp?object
CBsplineApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CBsplineApp?initialization
BOOL?CBsplineApp::InitInstance()
{
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
//?Change?the?registry?key?under?which?our?settings?are?stored.
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization.
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
LoadStdProfileSettings();??//?Load?standard?INI?file?options?(including?MRU)
//?Register?the?application‘s?document?templates.??Document?templates
//??serve?as?the?connection?between?documents?frame?windows?and?views.
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CBsplineDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CBsplineView));
AddDocTemplate(pDocTemplate);
//?Parse?command?line?for?standard?shell?commands?DDE?file?open
CCommandLineInfo?cmdInfo;
ParseCommandLine(cmdInfo);
//?Dispatch?commands?specified?on?the?command?line
if?(!ProcessShellCommand(cmdInfo))
return?FALSE;
//?The?one?and?only?window?has?been?initialized?so?show?and?update?it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????28424??2014-10-04?15:46??Bspline\Bspline.aps
?????文件???????2346??2014-10-04?15:46??Bspline\Bspline.clw
?????文件???????4227??2014-10-04?15:46??Bspline\Bspline.cpp
?????文件???????4705??2014-10-04?15:46??Bspline\Bspline.dsp
?????文件????????520??2014-10-04?15:46??Bspline\Bspline.dsw
?????文件???????1367??2014-10-04?15:46??Bspline\Bspline.h
?????文件??????91136??2014-10-04?15:46??Bspline\Bspline.ncb
?????文件??????50688??2014-10-04?15:46??Bspline\Bspline.opt
?????文件???????1408??2014-10-04?15:46??Bspline\Bspline.plg
?????文件??????11690??2014-10-04?15:46??Bspline\Bspline.rc
?????文件???????2769??2014-12-10?21:09??Bspline\Bspline1.cpp
?????文件????????848??2014-10-04?15:46??Bspline\Bspline1.h
?????文件???????1762??2014-10-04?15:46??Bspline\BsplineDoc.cpp
?????文件???????1486??2014-10-04?15:46??Bspline\BsplineDoc.h
?????文件???????4298??2014-10-04?15:46??Bspline\BsplineView.cpp
?????文件???????1935??2014-10-04?15:46??Bspline\BsplineView.h
?????文件???????2196??2014-10-04?15:46??Bspline\Cbspinde.cpp
?????文件????????423??2014-10-04?15:46??Bspline\Cbspinde.h
?????文件????3613696??2014-10-04?15:46??Bspline\Debug\Bspline.bsc
?????文件?????135221??2014-10-04?15:46??Bspline\Debug\Bspline.exe
?????文件?????345896??2014-10-04?15:46??Bspline\Debug\Bspline.ilk
?????文件??????35512??2014-10-04?15:46??Bspline\Debug\Bspline.obj
?????文件?????566272??2014-10-04?15:46??Bspline\Debug\Bspline.pdb
?????文件???????7304??2014-10-04?15:46??Bspline\Debug\Bspline.res
?????文件??????????0??2014-10-04?15:46??Bspline\Debug\Bspline.sbr
?????文件??????71203??2014-10-04?15:46??Bspline\Debug\Bspline1.obj
?????文件??????????0??2014-10-04?15:46??Bspline\Debug\Bspline1.sbr
?????文件??????14440??2014-10-04?15:46??Bspline\Debug\BsplineDoc.obj
?????文件??????????0??2014-10-04?15:46??Bspline\Debug\BsplineDoc.sbr
?????文件??????62498??2014-10-04?15:46??Bspline\Debug\BsplineView.obj
............此處省略24個文件信息
評論
共有 條評論