Share via


CPropExchange::ExchangePersistentProp

Exchanges a property between the control and a file.

virtual BOOL ExchangePersistentProp( 
   LPCTSTR pszPropName, 
   LPUNKNOWN* ppUnk, 
   REFIID iid, 
   LPUNKNOWN pUnkDefault  
) = 0;

Parameters

  • pszPropName
    The name of the property being exchanged.

  • ppUnk
    A pointer to a variable containing a pointer to the property's IUnknown interface (this variable is typically a member of your class).

  • iid
    Interface ID of the interface on the property that the control will use.

  • pUnkDefault
    Default value for the property.

Return Value

Nonzero if the exchange was successful; 0 if unsuccessful.

Remarks

If the property is being loaded from the file to the control, the property is created and initialized from the file. If the property is being stored, its value is written to the file.

The functions CArchivePropExchange::ExchangePersistentProp, CResetPropExchange::ExchangePersistentProp, and CPropsetPropExchange::ExchangePersistentProp override this pure virtual function.

Requirements

Header: afxctl.h

See Also

Reference

CPropExchange Class

Hierarchy Chart

COleControl::DoPropExchange

CPropExchange::ExchangeBlobProp

CPropExchange::ExchangeFontProp

CPropExchange::ExchangeProp

Other Resources

CPropExchange Members