IPropertyPageImpl 类
此类实现 IUnknown
并提供 IPropertyPage 接口的默认实现。
重要
无法在 Windows 运行时中执行的应用程序中使用此类及其成员。
语法
template<class T>
class IPropertyPageImpl
参数
T
你的类,派生自 IPropertyPageImpl
。
成员
公共构造函数
名称 | 描述 |
---|---|
IPropertyPageImpl::IPropertyPageImpl | 构造函数。 |
公共方法
名称 | 描述 |
---|---|
IPropertyPageImpl::Activate | 为属性页创建对话框窗口。 |
IPropertyPageImpl::Apply | 将当前属性页值应用于通过 SetObjects 指定的基础对象。 ATL 实现返回 S_OK。 |
IPropertyPageImpl::Deactivate | 销毁使用 Activate 创建的窗口。 |
IPropertyPageImpl::GetPageInfo | 检索有关属性页的信息。 |
IPropertyPageImpl::Help | 调用属性页的 Windows 帮助。 |
IPropertyPageImpl::IsPageDirty | 指示属性页自激活后是否已更改。 |
IPropertyPageImpl::Move | 定位属性页对话框并调整其大小。 |
IPropertyPageImpl::SetDirty | 将属性页的状态标记为已更改或未更改。 |
IPropertyPageImpl::SetObjects | 为属性页关联对象提供 IUnknown 指针数组。 这些对象通过调用 Apply 接收当前属性值。 |
IPropertyPageImpl::SetPageSite | 为属性页提供 IPropertyPageSite 指针,属性页通过该指针与属性框架通信。 |
IPropertyPageImpl::Show | 使属性页对话框可见或不可见。 |
IPropertyPageImpl::TranslateAccelerator | 处理指定的击键。 |
公共数据成员
“属性” | 描述 |
---|---|
IPropertyPageImpl::m_bDirty | 指定属性页的状态是否已更改。 |
IPropertyPageImpl::m_dwDocString | 存储与描述属性页的文本字符串关联的资源标识符。 |
IPropertyPageImpl::m_dwHelpContext | 存储与属性页关联的帮助主题的上下文标识符。 |
IPropertyPageImpl::m_dwHelpFile | 存储与描述属性页的帮助文件名关联的资源标识符。 |
IPropertyPageImpl::m_dwTitle | 存储与属性页的选项卡中显示的文本字符串关联的资源标识符。 |
IPropertyPageImpl::m_nObjects | 存储与属性页关联的对象数。 |
IPropertyPageImpl::m_pPageSite | 指向属性页与属性框架通信的 IPropertyPageSite 接口。 |
IPropertyPageImpl::m_ppUnk | 指向 IUnknown 指针数组,该指针指向与属性页关联的对象。 |
IPropertyPageImpl::m_size | 存储属性页对话框的高度和宽度(以像素为单位)。 |
备注
IPropertyPage 接口允许对象管理属性表中的特定属性页。 类 IPropertyPageImpl
提供此接口的默认实现,并通过在调试版本中将信息发送到转储设备来实现 IUnknown
。
继承层次结构
IPropertyPage
IPropertyPageImpl
要求
标头:atlctl.h
IPropertyPageImpl::Activate
为属性页创建对话框窗口。
HRESULT Activate(
HWND hWndParent,
LPCRECT pRect,
BOOL bModal);
备注
默认情况下,无论 bModal 参数的值如何,对话框始终是无模式的。
请参阅 Windows SDK 中的 IPropertyPage::Activate。
IPropertyPageImpl::Apply
将当前属性页值应用于通过 SetObjects
指定的基础对象。
HRESULT Apply();
返回值
返回 S_OK。
注解
请参阅 Windows SDK 中的 IPropertyPage::Apply。
IPropertyPageImpl::Deactivate
销毁使用激活创建的对话框窗口。
HRESULT Deactivate();
注解
请参阅 Windows SDK 中的 IPropertyPage::Deactivate。
IPropertyPageImpl::GetPageInfo
使用数据成员中包含的信息填充 pPageInfo 结构。
HRESULT GetPageInfo(PROPPAGEINFO* pPageInfo);
注解
GetPageInfo
加载与 m_dwDocString、m_dwHelpFile 和 m_dwTitle 关联的字符串资源。
请参阅 Windows SDK 中的 IPropertyPage::GetPageInfo。
IPropertyPageImpl::Help
调用属性页的 Windows 帮助。
HRESULT Help(PROPPAGEINFO* pPageInfo);
备注
请参阅 Windows SDK 中的 IPropertyPage::Help。
IPropertyPageImpl::IPropertyPageImpl
构造函数。
IPropertyPageImpl();
备注
初始化所有数据成员。
IPropertyPageImpl::IsPageDirty
指示属性页自激活后是否已更改。
HRESULT IsPageDirty(void);
备注
如果页面自激活后已更改,则 IsPageDirty
返回 S_OK。
IPropertyPageImpl::m_bDirty
指定属性页的状态是否已更改。
BOOL m_bDirty;
IPropertyPageImpl::m_nObjects
存储与属性页关联的对象数。
ULONG m_nObjects;
IPropertyPageImpl::m_dwHelpContext
存储与属性页关联的帮助主题的上下文标识符。
DWORD m_dwHelpContext;
IPropertyPageImpl::m_dwDocString
存储与描述属性页的文本字符串关联的资源标识符。
UINT m_dwDocString;
IPropertyPageImpl::m_dwHelpFile
存储与描述属性页的帮助文件名关联的资源标识符。
UINT m_dwHelpFile;
IPropertyPageImpl::m_dwTitle
存储与属性页的选项卡中显示的文本字符串关联的资源标识符。
UINT m_dwTitle;
IPropertyPageImpl::m_pPageSite
指向属性页与属性框架通信的 IPropertyPageSite 接口。
IPropertyPageSite* m_pPageSite;
IPropertyPageImpl::m_ppUnk
指向 IUnknown
指针数组,该指针指向与属性页关联的对象。
IUnknown** m_ppUnk;
IPropertyPageImpl::m_size
存储属性页对话框的高度和宽度(以像素为单位)。
SIZE m_size;
IPropertyPageImpl::Move
定位属性页对话框并调整其大小。
HRESULT Move(LPCRECT pRect);
备注
请参阅 Windows SDK 中的 IPropertyPage::Move。
IPropertyPageImpl::SetDirty
根据 bDirty 的值,将属性页的状态标记为已更改或未更改。
void SetDirty(BOOL bDirty);
参数
bDirty
[in] 如果为 TRUE,则属性页的状态将标记为已更改。 否则,将标记为未更改。
注解
必要情况下,SetDirty
会通知框架属性页已更改。
IPropertyPageImpl::SetObjects
为属性页关联对象提供 IUnknown
指针数组。
HRESULT SetObjects(ULONG nObjects, IUnknown** ppUnk);
备注
请参阅 Windows SDK 中的 IPropertyPage::SetObjects。
IPropertyPageImpl::SetPageSite
为属性页提供 IPropertyPageSite 指针,属性页通过该指针与属性框架通信。
HRESULT SetPageSite(IPropertyPageSite* pPageSite);
备注
请参阅 Windows SDK 中的 IPropertyPage::SetPageSite。
IPropertyPageImpl::Show
使属性页对话框可见或不可见。
HRESULT Show(UINT nCmdShow);
备注
请参阅 Windows SDK 中的 IPropertyPage::Show。
IPropertyPageImpl::TranslateAccelerator
处理在 pMsg
中指定的击键。
HRESULT TranslateAccelerator(MSG* pMsg);
备注
请参阅 Windows SDK 中的 IPropertyPage::TranslateAccelerator。
另请参阅
IPropertyPage2Impl 类
IPerPropertyBrowsingImpl 类
ISpecifyPropertyPagesImpl 类
类概述