MFC——属性页对话框的创建

本文详细介绍了如何使用CPropertyPage和CPropertySheet类来创建属性对话框,包括创建属性页、加载到类中以及在视图类中显示列表的过程。重点突出了属性对话框在软件开发中的应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1,首先创建几个属性页对话框,并且修改其的ID号
2,使用类向导选项建立相关属性对话框页的类,这个类基于CPropertyPage类,就可以把一个界面与一个类相关起来
3,根据MSDN手册可知:
Objects of class CPropertySheet represent property sheets, otherwise known as tab dialog boxes. A property sheet consists of a CPropertySheet object and one or more CPropertyPage objects. A property sheet is displayed by the framework as a window with a set of tab indices, with which the user selects the current page, and an area for the currently selected page.
必须建立一个基于 CPropertySheet类的子类。
4,Even though CPropertySheet is not derived from CDialog, managing a CPropertySheet object is similar to managing a CDialog object. For example, creation of a property sheet requires two-part construction: call the constructor, and then call DoModal for a modal property sheet or Create for a modeless property sheet. CPropertySheet has two types of constructors: CPropertySheet::Construct and CPropertySheet::CPropertySheet.
将创建完的属性对话框页加载进入这个类中(新建属性对话框页的几个相关变量,在其构造函数中使用AddAddPage函数)
5,在View类中新建一个对话框,用于显示列表

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值