Freigeben über


COleDataSource::CacheGlobalData

Call this function to specify a format in which data is offered during data transfer operations.

void CacheGlobalData(
   CLIPFORMAT cfFormat,
   HGLOBAL hGlobal,
   LPFORMATETC lpFormatEtc = NULL 
);

Parameters

  • cfFormat
    The Clipboard format in which the data is to be offered. This parameter can be one of the predefined Clipboard formats or the value returned by the native Windows RegisterClipboardFormat function.

  • hGlobal
    Handle to the global memory block containing the data in the format specified.

  • lpFormatEtc
    Points to a FORMATETC structure describing the format in which the data is to be offered. Provide a value for this parameter if you want to specify additional format information beyond the Clipboard format specified by cfFormat. If it is NULL, default values are used for the other fields in the FORMATETC structure.

Remarks

This function provides the data using immediate rendering, so you must supply the data when calling the function; the data is cached until needed. Use the CacheData member function if you are supplying a large amount of data or if you require a structured storage medium.

To use delayed rendering, call the DelayRenderData or DelayRenderFileData member function. For more information on delayed rendering as handled by MFC, see the article Data Objects and Data Sources: Manipulation.

For more information, see the FORMATETC structure in the Windows SDK*.*

For more information, see RegisterClipboardFormat in the Windows SDK.

Requirements

Header: afxole.h

See Also

Concepts

COleDataSource Class

COleDataSource Members

Hierarchy Chart

COleDataSource::CacheData

COleDataSource::DelayRenderData

COleDataSource::DelayRenderFileData