COleControl::OnSetData

Called by the framework to replace the control's data with the specified data.

virtual BOOL OnSetData(  
   LPFORMATETC lpFormatEtc,  
   LPSTGMEDIUM lpStgMedium, 
   BOOL bRelease  
);

Parameters

  • lpFormatEtc
    Pointer to a FORMATETC structure specifying the format of the data.

  • lpStgMedium
    Pointer to a STGMEDIUM structure in which the data resides.

  • bRelease
    TRUE if the control should free the storage medium; FALSE if the control should not free the storage medium.

Return Value

Nonzero if successful; otherwise 0.

Remarks

If the data is in the persistent property set format, the default implementation modifies the control's state accordingly. Otherwise, the default implementation does nothing. If bRelease is TRUE, then a call to ReleaseStgMedium is made; otherwise not.

Override this function to replace the control's data with the specified data.

For more information, see the FORMATETC and STGMEDIUM structures in the Windows SDK.

Requirements

Header: afxctl.h

See Also

Reference

COleControl Class

Hierarchy Chart

COleControl::DoPropExchange