資源簡介
VC++實現三維旋轉,顯示調用OPENGL庫,算法參考于計算機圖形學
代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“Test1.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
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????20024??2008-03-16?14:22??普通算法\Test1\Debug\MainFrm.obj
?????文件?????107085??2008-03-16?14:22??普通算法\Test1\Debug\StdAfx.obj
?????文件?????131153??2008-03-16?14:22??普通算法\Test1\Debug\Test1.exe
?????文件??????22998??2008-03-16?14:22??普通算法\Test1\Debug\Test1.obj
?????文件?????353280??2008-03-16?14:22??普通算法\Test1\Debug\Test1.pdb
?????文件???????7244??2008-03-16?14:22??普通算法\Test1\Debug\Test1.res
?????文件??????14774??2008-03-16?14:22??普通算法\Test1\Debug\Test1Doc.obj
?????文件??????46002??2008-03-16?14:22??普通算法\Test1\Debug\Test1View.obj
?????文件?????364544??2008-03-16?14:22??普通算法\Test1\Debug\vc60.pdb
?????文件???????2506??2008-03-09?15:09??普通算法\Test1\MainFrm.cpp
?????文件???????1581??2008-03-09?15:09??普通算法\Test1\MainFrm.h
?????文件???????4287??2008-03-09?15:09??普通算法\Test1\ReadMe.txt
?????文件???????1078??2008-03-09?15:09??普通算法\Test1\res\Test1.ico
?????文件????????397??2008-03-09?15:09??普通算法\Test1\res\Test1.rc2
?????文件???????1078??2008-03-09?15:09??普通算法\Test1\res\Test1Doc.ico
?????文件???????1078??2008-03-09?15:09??普通算法\Test1\res\Toolbar.bmp
?????文件????????492??2008-03-09?15:09??普通算法\Test1\Resource.h
?????文件????????207??2008-03-09?15:09??普通算法\Test1\StdAfx.cpp
?????文件???????1114??2008-03-13?17:24??普通算法\Test1\StdAfx.h
?????文件??????28552??2008-03-15?11:07??普通算法\Test1\Test1.aps
?????文件???????2235??2008-03-15?16:10??普通算法\Test1\Test1.clw
?????文件???????4191??2008-03-09?15:09??普通算法\Test1\Test1.cpp
?????文件???????4582??2008-03-09?16:14??普通算法\Test1\Test1.dsp
?????文件????????518??2008-03-09?15:39??普通算法\Test1\Test1.dsw
?????文件???????1345??2008-03-09?15:09??普通算法\Test1\Test1.h
?????文件??????99328??2008-03-16?15:21??普通算法\Test1\Test1.ncb
?????文件??????55808??2008-03-16?15:21??普通算法\Test1\Test1.opt
?????文件???????2421??2008-03-16?14:22??普通算法\Test1\Test1.plg
?????文件??????10536??2008-03-09?15:09??普通算法\Test1\Test1.rc
?????文件???????1722??2008-03-09?15:09??普通算法\Test1\Test1Doc.cpp
............此處省略10個文件信息
評論
共有 條評論