Condividi tramite


COleDataObject::GetData

Call this function to retrieve data from the item in the specified format.

BOOL GetData(
   CLIPFORMAT cfFormat,
   LPSTGMEDIUM lpStgMedium,
   LPFORMATETC lpFormatEtc = NULL 
);

Parameters

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

  • lpStgMedium
    Points to a STGMEDIUM structure that will receive data.

  • lpFormatEtc
    Points to a FORMATETC structure describing the format in which data is to be returned. 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, the default values are used for the other fields in the FORMATETC structure.

Return Value

Nonzero if successful; otherwise 0.

Remarks

For more information, see IDataObject::GetData, STGMEDIUM, and FORMATETC in the Windows SDK.

For more information, see RegisterClipboardFormat in the Windows SDK.

Requirements

Header: afxole.h

See Also

Reference

COleDataObject Class

Hierarchy Chart

COleDataObject::GetFileData

COleDataObject::GetGlobalData

COleDataObject::IsDataAvailable

Other Resources

COleDataObject Members