[BCG]如何建立一个BCG属性页对话框
来源:互联网 发布:天盾android数据恢复 编辑:程序博客网 时间:2024/05/22 04:35
原创文章,欢迎转载。转载请注明:转载自 祥的博客
原文链接:http://blog.csdn.net/humanking7/article/details/51262287
1. 新建BCG的Dialog项目
2. 添加一个继承CBCGPPropertySheet的类
3. 转换程序入口处将Dialog对象换成新建类对象
在入口程序的 BOOL CQFX_BCGAppApp::InitInstance()
中更改。
/* //原来的代码CQFX_BCGAppDlg dlg; //原来的Dialog类对象m_pMainWnd = &dlg;INT_PTR nResponse = dlg.DoModal();*///现在的代码QFXMainPpSheet mainPpSheet; //现在的CBCGPPropertySheet类对象m_pMainWnd = &mainPpSheet;INT_PTR nResponse = mainPpSheet.DoModal();
现在可以删除原来的继承Dialog的类文件
4. 设计Page页面
但是,Page1
这个类要继承于类 CBCGPPropertyPage
,所以要修改 Page1.h 和 Page1.cpp。
Page1.h 新加代码
#pragma once#include "resource.h"// Page1 对话框class Page1 : public CBCGPPropertyPage{//从CPropertyPage改为CBCGPPropertyPage DECLARE_DYNAMIC(Page1)public: Page1(); virtual ~Page1();// 对话框数据 enum { IDD = IDD_PAGE1 };protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 DECLARE_MESSAGE_MAP()};
Page1.cpp 新加代码
// Page1.cpp : 实现文件//#include "stdafx.h"#include "QFX_BCGApp.h"#include "Page1.h"// Page1 对话框IMPLEMENT_DYNAMIC(Page1, CBCGPPropertyPage)//从CPropertyPage改为CBCGPPropertyPagePage1::Page1() : CBCGPPropertyPage(Page1::IDD){//从CPropertyPage改为CBCGPPropertyPage}Page1::~Page1(){}void Page1::DoDataExchange(CDataExchange* pDX){ //从CPropertyPage改为CBCGPPropertyPage CBCGPPropertyPage::DoDataExchange(pDX);}//从CPropertyPage改为CBCGPPropertyPageBEGIN_MESSAGE_MAP(Page1, CBCGPPropertyPage)END_MESSAGE_MAP()// Page1 消息处理程序
QFXMainPpSheet.h 新加代码
//作为主框架的类#pragma once#include "bcgppropertysheet.h"#include "Page1.h"//new Add#include "Page2.h"//new Addclass QFXMainPpSheet : public CBCGPPropertySheet{ //DECLARE_DYNAMIC(QFXMainPpSheet)//new Addpublic: ~QFXMainPpSheet(void); QFXMainPpSheet(CWnd* pParentWnd = NULL);//new Add Page1 m_Page1;//new Add Page2 m_Page2;//new Add};
QFXMainPpSheet.cpp 新加代码
#include "StdAfx.h"#include "QFXMainPpSheet.h"QFXMainPpSheet::~QFXMainPpSheet(void){}//new AddQFXMainPpSheet::QFXMainPpSheet( CWnd* pParentWnd /*= NULL*/ ):CBCGPPropertySheet (IDS_CAPTION, pParentWnd)//new Add{// IDS_CAPTION 是窗口标题,是预先添加的资源类型 //这是改变BCG的皮肤,两者必须要同时使用,而且需要预先添加资源图片,这里是IDB_ICONS32 SetLook (CBCGPPropertySheet::PropSheetLook_OutlookBar);//new Add SetIconsList ( IDB_ICONS32, 32);//new Add AddPage(&m_Page1);//new Add AddPage(&m_Page2);//new Add}
5. 运行程序
6.程序框架
Next····
接着请看[BCG]属性页对话框删除”上一步”…”帮助”等4个按钮
0 0
- [BCG]如何建立一个BCG属性页对话框
- 如何构建BCG框架,BCG属性页,MFC框架属性页
- bcg
- bcg
- BCG
- BCG
- BCG属性列表
- [BCG]属性页对话框删除"上一步"..."帮助"等4个按钮
- 制作一个BCG单文档模拟的对话框
- 如何将基于对话框的工程改成基于BCG的
- 如何将基于对话框的工程改成基于BCG的
- 如何响应BCG的属性列表(CBCGPPropList)改变的事件?
- [BCG]使属性页表单实现最大化最小化按钮1
- 7.使对话框呈现BCG风格
- bcg知识
- bcg知识
- BCG使用
- BCG教程
- ionic版本从v1.0.0升级到v1.2.4后,android上使用<ion-content>的页面无法滑动
- ajax动态添加tr td (并用PHP返回值设置tr样式,用于删除操作
- TDDL动态数据源开源-示例使用说明
- Python之numpy
- Cocosd2d-js 数组使用
- [BCG]如何建立一个BCG属性页对话框
- header函数运用
- annovar对人类基因组和非人类基因组variants注释流程
- Css背景
- Docker--容器中数据管理--RHEL7.2
- iOS、mac开源项目及库汇总
- ACM--BFS--残缺的棋盘--CUS 1511--第十届湖南省赛
- JSch:纯JAVA实现SFTP文件上传和下载
- hadoop经典wordcount和hdfs增加删除追加