COleDataSource::OnRenderFileData

virtual BOOL OnRenderFileData( LPFORMATETC lpFormatEtc, CFile* pFile );

Return Value

Nonzero if successful; otherwise 0.

Parameters

lpFormatEtc

Points to the FORMATETC structure specifying the format in which information is requested.

pFile

Points to a CFile object in which the data is to be rendered.

Remarks

Called by the framework to retrieve data in the specified format when the specified storage medium is a file. The specified format is one previously placed in the COleDataSource object using the DelayRenderData member function for delayed rendering. The default implementation of this function simply returns FALSE.

This is an advanced overridable. Override this function to supply your data in the requested format and medium. Depending on your data, you might want to override one of the other versions of this function instead. If you want to handle multiple storage media, override OnRenderData. If your data is in a file, or is of variable size, override OnRenderFileData. For more information on delayed rendering as handled by MFC, see the article Data Objects and Data Sources: Manipulation in Visual C++ Programmer’s Guide.

For more information, see the FORMATETC structure and IDataObject::GetData in the OLE 2 Programmer’s Reference, Volume 1.

COleDataSource OverviewClass MembersHierarchy Chart

See Also   COleDataSource::DelayRenderData, COleDataSource::DelayRenderFileData, COleDataSource::OnRenderData, COleDataSource::OnRenderGlobalData, COleDataSource::OnSetData, CFile