資源簡介
在mfc下完成cuda與opengl的交互,同時(shí)程序里還包含各種鼠標(biāo).鍵盤響應(yīng),如放大,縮小,旋轉(zhuǎn)等
代碼片段和文件信息
//?MainFrm.cpp?:?CMainframe?類的實(shí)現(xiàn)
//
#include?“stdafx.h“
#include?“Test2.h“
#include?“MainFrm.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CMainframe
IMPLEMENT_DYNCREATE(CMainframe?CframeWnd)
BEGIN_MESSAGE_MAP(CMainframe?CframeWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()
static?UINT?indicators[]?=
{
ID_SEPARATOR???????????//?狀態(tài)行指示器
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};
//?CMainframe?構(gòu)造/析構(gòu)
CMainframe::CMainframe()
{
//?TODO:?在此添加成員初始化代碼
}
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(“未能創(chuàng)建工具欄\n“);
return?-1;??????//?未能創(chuàng)建
}
if?(!m_wndStatusBar.Create(this)?||
!m_wndStatusBar.SetIndicators(indicators
??sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“未能創(chuàng)建狀態(tài)欄\n“);
return?-1;??????//?未能創(chuàng)建
}
//?TODO:?如果不需要可停靠工具欄,則刪除這三行
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:?在此處通過修改
//??CREATESTRUCT?cs?來修改窗口類或樣式
return?TRUE;
}
//?CMainframe?診斷
#ifdef?_DEBUG
void?CMainframe::AssertValid()?const
{
CframeWnd::AssertValid();
}
void?CMainframe::Dump(CDumpContext&?dc)?const
{
CframeWnd::Dump(dc);
}
#endif?//_DEBUG
//?CMainframe?消息處理程序
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????204800??2010-02-25?01:42??Test2\Debug\glew32.dll
?????文件?????144384??2012-05-25?19:03??Test2\Debug\Test2.exe
?????文件????3681280??2012-05-25?19:03??Test2\Debug\Test2.pdb
?????文件?????204800??2010-02-25?01:42??Test2\glew32.dll
?????文件???????2124??2012-05-25?18:20??Test2\Test2\CUDA.cu
?????文件???????6614??2012-05-25?19:03??Test2\Test2\Debug\BuildLog.htm
?????文件??????60775??2012-05-25?18:20??Test2\Test2\Debug\CUDA.cu.obj
?????文件??????34179??2012-05-25?16:32??Test2\Test2\Debug\MainFrm.obj
?????文件?????????65??2012-05-25?19:03??Test2\Test2\Debug\mt.dep
?????文件?????465607??2012-05-25?16:32??Test2\Test2\Debug\stdafx.obj
?????文件????????861??2012-05-25?19:03??Test2\Test2\Debug\Test2.exe.intermediate.manifest
?????文件??????61446??2012-05-25?16:32??Test2\Test2\Debug\Test2.obj
?????文件???25296896??2012-05-25?16:32??Test2\Test2\Debug\Test2.pch
?????文件??????28188??2012-05-25?16:32??Test2\Test2\Debug\Test2.res
?????文件??????21136??2012-05-25?16:32??Test2\Test2\Debug\Test2Doc.obj
?????文件??????93947??2012-05-25?19:03??Test2\Test2\Debug\Test2View.obj
?????文件????1182720??2012-05-25?19:03??Test2\Test2\Debug\vc90.idb
?????文件????2166784??2012-05-25?19:03??Test2\Test2\Debug\vc90.pdb
?????文件???????1795??2012-05-16?18:49??Test2\Test2\MainFrm.cpp
?????文件????????655??2012-05-16?18:49??Test2\Test2\MainFrm.h
?????文件???????3382??2012-05-16?18:49??Test2\Test2\ReadMe.txt
????.......?????21630??2003-07-24?09:52??Test2\Test2\res\Test2.ico
?????文件????????361??2012-05-16?18:49??Test2\Test2\res\Test2.rc2
????.......??????1078??2003-07-24?09:52??Test2\Test2\res\Test2Doc.ico
????.......??????1078??2003-07-24?09:52??Test2\Test2\res\Toolbar.bmp
?????文件????????677??2012-05-18?22:15??Test2\Test2\resource.h
?????文件????????136??2012-05-16?18:49??Test2\Test2\stdafx.cpp
?????文件???????1796??2012-05-16?18:49??Test2\Test2\stdafx.h
?????文件???????1030??2012-05-16?18:49??Test2\Test2\targetver.h
?????文件??????67180??2012-05-18?22:15??Test2\Test2\Test2.aps
............此處省略21個(gè)文件信息
評論
共有 條評論