BCG使用注意事项
来源:互联网 发布:windows api函数手册 编辑:程序博客网 时间:2024/06/06 08:30
BCGappWizard生成的应用程序特点:
1、在Stdafx.h中添加BCG的头文件
#include <BCGCBProInc.h> // BCGPro Control Bar
2、应用程序类的派生方法:
class CDlgBarsApp : public CWinApp,
public CBCGPWorkspace
{
public:
CDlgBarsApp();
…………
}
3、AfxEnableControlContainer():
You must call the AfxEnableControlContainer function when you use OLE control containers in Visual C++
BOOL CDlgBarsApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
AfxOleInit :初始化COM库。
4、 BCGCBProCleanUp ():顾名思义吧,呵呵
对于模式对话框:
CDlgBarsDlg dlg;
m_pMainWnd = &dlg;
int nResponse = (int) dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
BCGCBProCleanUp ();
另外:可以在应用程序类的ExitInstance()中使用。防止BCG资源内存泄漏。
5、BCG软件例子无法修改编译,这是因为BCG界面库会自动写注册表,解决:
a、最笨,修改注册表
b、最简单,不让写注册表。在CxxxApp的InitInstance()中加入一句:m_bSaveState=FALSE;
BOOL CDlgBarsApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
m_bSaveState = FALSE;
c、虽然写了,还可以这样:
int CXXXApp::ExitInstance()
{
BCGCBProCleanUp();
this->CleanState();
return CWinApp::ExitInstance();
}
- BCG使用注意事项
- BCG使用注意事项
- BCG使用
- BCG包的使用
- 初次使用BCG库
- bcg 简明使用教程
- BCG使用须知
- 初次使用BCG库
- 初次使用BCG库
- BCG安装与使用
- 使用BCG创建Pie
- bcg
- bcg
- BCG
- BCG
- BCG界面库使用笔记
- BCG在程序中的使用
- BCG中使用状态栏显示状态信息
- 面试非技术经验or注意事项总结...
- 定点c程序之一:定标
- 面试——前3分钟定终身
- 实习的一些收获1
- 【STM32 .Net MF开发板学习-12】跳动的音符(PWM合成)
- BCG使用注意事项
- 2010-08-18
- 26个英文站seo必备查询工具
- 明天《敢死队》就要上映啦!期待啊!
- Oracle 基础知识
- 时间计算
- 手工创建Oracle数据库脚本及说明
- Java面试答题技巧
- 工具栏