CPropExchange Class

Supports the implementation of persistence for your OLE controls.

class AFX_NOVTABLE CPropExchange

Members

Public Methods

Name

Description

CPropExchange::ExchangeBlobProp

Exchanges a binary large object (BLOB) property.

CPropExchange::ExchangeFontProp

Exchanges a font property.

CPropExchange::ExchangePersistentProp

Exchanges a property between a control and a file.

CPropExchange::ExchangeProp

Exchanges properties of any built-in type.

CPropExchange::ExchangeVersion

Exchanges the version number of an OLE control.

CPropExchange::GetVersion

Retrieves the version number of an OLE control.

CPropExchange::IsAsynchronous

Determines if property exchanges are done asynchronously.

CPropExchange::IsLoading

Indicates whether properties are being loaded into the control or saved from it.

Remarks

CPropExchange does not have a base class.

Establishes the context and direction of a property exchange.

Persistence is the exchange of the control's state information, usually represented by its properties, between the control itself and a medium.

The framework constructs an object derived from CPropExchange when it is notified that an OLE control's properties are to be loaded from or stored to persistent storage.

The framework passes a pointer to this CPropExchange object to your control's DoPropExchange function. If you used a wizard to create the starter files for your control, your control's DoPropExchange function calls COleControl::DoPropExchange. The base-class version exchanges the control's stock properties; you modify your derived class's version to exchange properties you have added to your control.

CPropExchange can be used to serialize a control's properties or initialize a control's properties upon the load or creation of a control. The ExchangeProp and ExchangeFontProp member functions of CPropExchange are able to store properties to and load them from different media.

For more information on using CPropExchange, see the article MFC ActiveX Controls: Property Pages.

Inheritance Hierarchy

CPropExchange

Requirements

Header: afxctl.h

See Also

Reference

Hierarchy Chart

COleControl::DoPropExchange