Partager via


COleServerItem::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 COleDataSource object using the DelayRenderData or DelayRenderFileData member function 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 neither of these formats is supplied, the default implementation returns 0 and does nothing.

If lpStgMedium->tymed is TYMED_NULL, the STGMEDIUM should allocated and filled as specified by lpFormatEtc->tymed. If not TYMED_NULL, the STGMEDIUM should be filled in place with the data.

This is an advanced overridable. 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 IDataObject::GetData, STGMEDIUM, FORMATETC, and TYMED in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

COleServerItem Class

Hierarchy Chart

COleServerItem::OnRenderFileData