、选件类

此选件类实现 IUnknown 并允许对象保存其属性设置为一个由客户端提供的属性包。

重要

此选件类及其成员不能在 Windows 运行时执行的应用程序。

template < 
class T 
>
class ATL_NO_VTABLE IPersistPropertyBagImpl :
public IPersistPropertyBag

参数

  • T
    您的选件类,从派生 IPersistPropertyBagImpl

成员

51scekz8.collapse_all(zh-cn,VS.110).gif公共方法

名称

说明

IPersistPropertyBagImpl::GetClassID

检索对象的CLSID。

IPersistPropertyBagImpl::InitNew

初始化新创建的对象。 ATL实现返回 S_OK。

IPersistPropertyBagImpl::Load

从一个由客户端提供的属性包加载对象的属性。

IPersistPropertyBagImpl::Save

保存对象的属性设置为一个由客户端提供的属性包。

备注

IPersistPropertyBag 接口允许对象保存其属性设置为一个由客户端提供的属性包。 选件类 IPersistPropertyBagImpl 提供此接口的默认实现并将信息发送实现 IUnknown 到转储计算机进行编译。

IPersistPropertyBagIPropertyBagIErrorLog协同工作。 必须由客户端实现后面这两个接口。 通过 IPropertyBag,客户端保存和加载对象的各个属性。 通过 IErrorLog,对象和客户端可能会遇到的任何错误。

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

继承层次结构

IPersistPropertyBag

IPersistPropertyBagImpl

要求

Header: atlcom.h

请参见

参考

BEGIN_PROP_MAP

其他资源

ATL选件类概述