Udostępnij za pośrednictwem


COleControl::ExchangeVersion

Serializes or initializes the state of a control's version information.

BOOL ExchangeVersion( 
   CPropExchange* pPX, 
   DWORD dwVersionDefault, 
   BOOL bConvert = TRUE  
);

Parameters

  • pPX
    A pointer to a CPropExchange object. The framework supplies this object to establish the context of the property exchange, including its direction.

  • dwVersionDefault
    The current version number of the control.

  • bConvert
    Indicates whether persistent data should be converted to the latest format when saved, or maintained in the same format that was loaded.

Return Value

Nonzero of the function succeeded; 0 otherwise.

Remarks

Typically, this will be the first function called by a control's override of COleControl::DoPropExchange. When loading, this function reads the version number of the persistent data, and sets the version attribute of the CPropExchange object accordingly. When saving, this function writes the version number of the persistent data.

For more information on persistence and versioning, see the article ActiveX Controls: Serializing.

Requirements

Header: afxctl.h

See Also

Reference

COleControl Class

Hierarchy Chart

COleControl::DoPropExchange

Other Resources

COleControl Members