由于英文不好,且BCG的自身文档不能完全跟得上其版本的问题,第一次弄还是有些麻烦,这里记录下来。
主要还是靠其提供的例子来看其使用。
1.设置项目属性:
C/C++
预处理器中,预处理定义添加_BCGCBPRO_STATIC_宏。
资源
常规中,预处理定义添加_BCGCBPRO_STATIC_宏。
2.添加资源包含。在项目的*.rc文件中添加下面代码中的红色部分
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\SkinnedDialog.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
#if defined (_BCGCBPRO_STATIC_)
#include "BCGCBPro.rc"
#include "..\..\BCGCBPro\Styles\BCGPStyle2007Luna.rc"
#include "..\..\BCGCBPro\Styles\BCGPStyle2007Obsidian.rc"
#include "..\..\BCGCBPro\Styles\BCGPStyle2007Silver.rc"
#include "..\..\BCGCBPro\Styles\BCGPStyle2007Aqua.rc"
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "res\SkinnedDialog.rc2" // non-Microsoft Visual C++ edited resources
#include "afxres.rc" // Standard components
#endif
#if defined (_BCGCBPRO_STATIC_)
#include "BCGCBPro.rc"
#include "..\..\BCGCBPro\Styles\BCGPStyle2007Luna.rc"
#include "..\..\BCGCBPro\Styles\BCGPStyle2007Obsidian.rc"
#include "..\..\BCGCBPro\Styles\BCGPStyle2007Silver.rc"
#include "..\..\BCGCBPro\Styles\BCGPStyle2007Aqua.rc"
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
3.关于语言本地化(BCG框架的语言)。BCG在这方面不支持运行时切换。但为各个语言分别提供了资源,需要修改包含资源来重新编译生成代码来实现。