IPerPropertyBrowsingImpl 类

此类实现 IUnknown 并允许客户端访问对象属性页中的信息。

重要

无法在 Windows 运行时中执行的应用程序中使用此类及其成员。

语法

template <class T>
class ATL_NO_VTABLE IPerPropertyBrowsingImpl :
    public IPerPropertyBrowsing

参数

T
你的类,派生自 IPerPropertyBrowsingImpl

成员

公共方法

名称 描述
IPerPropertyBrowsingImpl::GetDisplayString 检索描述给定属性的字符串。
IPerPropertyBrowsingImpl::GetPredefinedStrings 检索与给定属性可以接受的值对应的字符串数组。
IPerPropertyBrowsingImpl::GetPredefinedValue 检索包含由给定 DISPID 标识的属性的值的 VARIANT。 DISPID 与从 GetPredefinedStrings 中检索的字符串名称相关联。 ATL 实现返回 E_NOTIMPL。
IPerPropertyBrowsingImpl::MapPropertyToPage 检索与给定属性关联的属性页的 CLSID。

备注

IPerPropertyBrowsing 接口允许客户端访问对象属性页中的信息。 类 IPerPropertyBrowsingImpl 提供此接口的默认实现,并通过在调试版本中将信息发送到转储设备来实现 IUnknown

注意

如果使用 Microsoft Access 作为容器应用程序,则必须从 IPerPropertyBrowsingImpl 中派生类。 否则,Access 不会加载控件。

相关文章ATL 教程创建 ATL 项目

继承层次结构

IPerPropertyBrowsing

IPerPropertyBrowsingImpl

要求

标头:atlctl.h

IPerPropertyBrowsingImpl::GetDisplayString

检索描述给定属性的字符串。

STDMETHOD(GetDisplayString)(
    DISPID dispID,
    BSTR* pBstr);

备注

请参阅 Windows SDK 中的 IPerPropertyBrowsing::GetDisplayString

IPerPropertyBrowsingImpl::GetPredefinedStrings

用零个项填充每个数组。

STDMETHOD(GetPredefinedStrings)(
    DISPID dispID,
    CALPOLESTR* pCaStringsOut,
    CADWORD* pCaCookiesOut);

返回值

ATL 的 GetPredefinedValue 实现返回E_NOTIMPL。

备注

请参阅 Windows SDK 中的 IPerPropertyBrowsing::GetPredefinedStrings

IPerPropertyBrowsingImpl::GetPredefinedValue

检索包含由给定 DISPID 标识的属性的值的 VARIANT。 DISPID 与从 GetPredefinedStrings 中检索的字符串名称相关联。

STDMETHOD(GetPredefinedValue)(
    DISPID dispID,
    DWORD dwCookie,
    VARIANT* pVarOut);

返回值

返回 E_NOTIMPL。

注解

ATL 的 GetPredefinedStrings 实现不会检索任何相应的字符串。

请参阅 Windows SDK 中的 IPerPropertyBrowsing::GetPredefinedStrings

IPerPropertyBrowsingImpl::MapPropertyToPage

检索与指定属性关联的属性页的 CLSID。

STDMETHOD(MapPropertyToPage)(
    DISPID dispID,
    CLSID* pClsid);

注解

ATL 使用对象的属性映射来获取此信息。

请参阅 Windows SDK 中的 IPerPropertyBrowsing::MapPropertyToPage

另请参阅

IPropertyPageImpl 类
ISpecifyPropertyPagesImpl 类
类概述