首页 > 代码库 > HiBCG

HiBCG

  • Req

根据VS的版本,编译对应的BCG解决方案。我使用的是VS2012,编译的是BCGCBPro110.sln。原因在此:

BCGCBProInc.h

...

#elif _MSC_VER == 1700
#define _BCGCB_LIBNAME_ _BCGCB_LIBNAME5_##"110.lib"

...

接下来新建一个清爽的MFC应用程序,我将它命名为FreeBCG。

注意,要保证编出来的BCG库与FreeBCG的字符集一致。

  • 环境变量

setx -m BCG_HOME "D:\BCG\BCGControlBarPro22"

  • 工作目录

$(BCG_HOME)\bin

  • 附加包含目录

$(BCG_HOME)\include;%(AdditionalIncludeDirectories)

  • 附加库目录

$(BCG_HOME)\bin;%(AdditionalLibraryDirectories)

  • Add the following include to the stdafx.h file —— #include "BCGCBProInc.h"
  • Derive your application class from CBCGPWinApp —— class CFreeBCGApp : public CBCGPWinApp
  • Make sure, that you call CBCGPWinApp::InitInstance() and AfxOleInit() in your application InitInstance()
  • Add the following call to InitInstance(): SetRegistryKey(_T("MyCompany\\MyProduct"));
  • Add a call to BCGCBProCleanUp() in your application ExitInstance()
  • Make the following global substitutions for the class names:
    • CFrameWnd -> CBCGPFrameWnd
    • CMDIFrameWnd -> CBCGPMDIFrameWnd
    • CMDIChildWnd -> CBCGPMDIChildWnd
    • CToolBar -> CBCGPToolBar
    • CStatusBar ->CBCGPStatusBar

 

HiBCG