CPropExchange Class

Supports the implementation of persistence for your OLE controls.

class AFX_NOVTABLE CPropExchange

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.

Requirements

Header: afxctl.h

See Also

Reference

Hierarchy Chart

COleControl::DoPropExchange

Other Resources

CPropExchange Members