[MFC]将基于对话框的工程改成基于BCG的

Step1

stdafx.h 加入如下内容。BCGCBProInc.h间接导入了lib

#include <BCGCBProInc.h>            // BCGControlBar Pro

#if _MSC_VER >= 1400

#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif

#endif

Step2

应用程序类的父类由CWinApp改成CBCGPWinApp。构造函数增加如下代码:

SetVisualTheme(BCGP_VISUAL_THEME_OFFICE_2010_BLUE);  

Step3

对话框的父类有CDialog改成CBCGPDialog。构造函数增加如下代码:

EnableVisualManagerStyle(TRUE, TRUE);  

donate

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试