COleControl::OnRenderData
Called by the framework to retrieve data in the specified format.
virtual BOOL OnRenderData(
LPFORMATETC lpFormatEtc,
LPSTGMEDIUM lpStgMedium
);
Parameters
lpFormatEtc
Points to the FORMATETC structure specifying the format in which information is requested.lpStgMedium
Points to a STGMEDIUM structure in which the data is to be returned.
Return Value
Nonzero if successful; otherwise 0.
Remarks
The specified format is one previously placed in the control object using the DelayRenderData or DelayRenderFileData member functions for delayed rendering. The default implementation of this function calls OnRenderFileData or OnRenderGlobalData, respectively, if the supplied storage medium is either a file or memory. If the requested format is CF_METAFILEPICT or the persistent property set format, the default implementation renders the appropriate data and returns nonzero. Otherwise, it returns 0 and does nothing.
If lpStgMedium->tymed is TYMED_NULL, the STGMEDIUM should be allocated and filled as specified by lpFormatEtc->tymed. If not TYMED_NULL, the STGMEDIUM should be filled in place with the data.
Override this function to provide your data in the requested format and medium. Depending on your data, you may want to override one of the other versions of this function instead. If your data is small and fixed in size, override OnRenderGlobalData. If your data is in a file, or is of variable size, override OnRenderFileData.
For more information, see the FORMATETC and STGMEDIUM structures in the Windows SDK.
Requirements
Header: afxctl.h
See Also
Reference
COleControl::OnRenderGlobalData