在MFC框架中使用Coin3D


在MFC框架中使用Coin3D源码,可对照教程参考学习学习,对C++面向对象有更深入理解
资源截图
代码片段和文件信息
// 这段 MFC 示例源代码演示如何使用 MFC Microsoft Office Fluent 用户界面 
// (“Fluent UI”)。该示例仅供参考,
// 用以补充《Microsoft 基础类参考》和 
// MFC C++ 库软件随附的相关电子文档。
// 复制、使用或分发 Fluent UI 的许可条款是单独提供的。
// 若要了解有关 Fluent UI 许可计划的详细信息,请访问  
// http://msdn.microsoft.com/officeui。
//
// 版权所有(C) Microsoft Corporation
// 保留所有权利。

// MainFrm.cpp : CMainframe 类的实现
//

#include “stdafx.h“
#include “rob.h“

#include “MainFrm.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

// CMainframe

IMPLEMENT_DYNCREATE(CMainframe CframeWndEx)

BEGIN_MESSAGE_MAP(CMainframe CframeWndEx)
ON_WM_CREATE()
ON_COMMAND_RANGE(ID_VIEW_APPLOOK_WIN_2000 ID_VIEW_APPLOOK_WINDOWS_7 &CMainframe::OnApplicationLook)
ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_WIN_2000 ID_VIEW_APPLOOK_WINDOWS_7 &CMainframe::OnUpdateApplicationLook)
END_MESSAGE_MAP()

// CMainframe 构造/析构

CMainframe::CMainframe()
{
// TODO: 在此添加成员初始化代码
theApp.m_nAppLook = theApp.GetInt(_T(“ApplicationLook“) ID_VIEW_APPLOOK_OFF_2007_BLUE);
}

CMainframe::~CMainframe()
{
}

int CMainframe::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CframeWndEx::OnCreate(lpCreateStruct) == -1)
return -1;

BOOL bNameValid;
// 基于持久值设置视觉管理器和样式
OnApplicationLook(theApp.m_nAppLook);

m_wndRibbonBar.Create(this);
m_wndRibbonBar.LoadFromResource(IDR_RIBBON);

if (!m_wndStatusBar.Create(this))
{
TRACE0(“未能创建状态栏
“);
return -1;      // 未能创建
}

CString strtitlePane1;
CString strtitlePane2;
bNameValid = strtitlePane1.LoadString(IDS_STATUS_PANE1);
ASSERT(bNameValid);
bNameValid = strtitlePane2.LoadString(IDS_STATUS_PANE2);
ASSERT(bNameValid);
m_wndStatusBar.AddElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE1 strtitlePane1 TRUE) strtitlePane1);
m_wndStatusBar.AddExtendedElement(new CMFCRibbonStatusBarPane(ID_STATUSBAR_PANE2 strtitlePane2 TRUE) strtitlePane2);

// 启用 Visual Studio 2005 样式停靠窗口行为
CDockingManager::SetDockingMode(DT_SMART);
// 启用 Visual Studio 2005 样式停靠窗口自动隐藏行为
EnableAutoHidePanes(CBRS_ALIGN_ANY);

return 0;
}

BOOL CMainframe::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CframeWndEx::PreCreateWindow(cs) )
return FALSE;
// TODO: 在此处通过修改
//  CREATESTRUCT cs 来修改窗口类或样式

return TRUE;
}

// CMainframe 诊断

#ifdef _DEBUG
void CMainframe::AssertValid() const
{
CframeWndEx::AssertValid();
}

void CMainframe::Dump(CDumpContext& dc) const
{
CframeWndEx::Dump(dc);
}
#endif //_DEBUG


// CMainframe 消息处理程序

void CMainframe::OnApplicationLook(UINT id)
{
CWaitCursor wait;

theApp.m_nAppLook = id;

switch (theApp.m_nAppLook)
{
case ID_VIEW_APPLOOK_WIN_2000:
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManager));
m_wndRibbonBar.SetWindows7Look(FALSE);
break;

case ID_VIEW_APPLOOK_OFF_XP:
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerOfficeXP));
m_wndRibbonBar.SetWindows7Look(FALSE);
break;

case ID_VIEW_APPLOOK_WIN_XP:
CMFCVisualManagerWindows::m_b3DTabsXP

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     372224  2018-09-10 16:58  robDebug
ob.exe

     文件    2406504  2018-09-10 16:58  robDebug
ob.ilk

     文件    5753856  2018-09-10 16:58  robDebug
ob.pdb

     文件     249344  2018-09-10 16:15  robDebugzzz.exe

     文件    2153252  2018-09-10 16:15  robDebugzzz.ilk

     文件    5237760  2018-09-10 16:15  robDebugzzz.pdb

     文件       4566  2018-09-10 16:58  rob
obDebugcl.command.1.tlog

     文件      99696  2018-09-10 16:58  rob
obDebugCL.read.1.tlog

     文件       3050  2018-09-10 16:58  rob
obDebugCL.write.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink-cvtres.read.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink-cvtres.write.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.15472-cvtres.read.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.15472-cvtres.write.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.15472.read.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.15472.write.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.6476-cvtres.read.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.6476-cvtres.write.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.6476.read.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.6476.write.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.8960-cvtres.read.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.8960-cvtres.write.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.8960.read.1.tlog

     文件          2  2018-09-10 16:58  rob
obDebuglink.8960.write.1.tlog

     文件       1994  2018-09-10 16:58  rob
obDebuglink.command.1.tlog

     文件       5724  2018-09-10 16:58  rob
obDebuglink.read.1.tlog

     文件       1232  2018-09-10 16:58  rob
obDebuglink.write.1.tlog

     文件     106021  2018-09-10 16:00  rob
obDebugMainFrm.obj

     文件        708  2018-09-10 16:58  rob
obDebugmt.command.1.tlog

     文件        632  2018-09-10 16:58  rob
obDebugmt.read.1.tlog

     文件        450  2018-09-10 16:58  rob
obDebugmt.write.1.tlog

............此处省略64个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)