This documentation is archived and is not being maintained.


Call this function to fill the specified COleDataSource object with all the data that would be copied to the Clipboard if you called CopyToClipboard (the same data would also be transferred if you called DoDragDrop).

void GetClipboardData(
   COleDataSource* pDataSource,
   BOOL bIncludeLink = FALSE,
   LPPOINT lpOffset = NULL,
   LPSIZE lpSize = NULL 



Pointer to the COleDataSource object that will receive the OLE item's data in all supported formats.


TRUE if link data should be copied to the Clipboard. FALSE if your server application does not support links.


The offset, in pixels, of the mouse cursor from the origin of the object.


The size of the object in pixels.

This function calls the GetEmbedSourceData member function to get the native data for the OLE item and calls the AddOtherClipboardData member function to get the presentation format and any supported conversion formats. If bIncludeLink is TRUE, the function also calls GetLinkSourceData to get the link data for the item.

Override this function if you want to put formats in a COleDataSource object before or after those formats supplied by CopyToClipboard.