Export (0) Print
Expand All
Expand Minimize

COleClientItem::GetClipboardData

Call this function to get a COleDataSource object containing all the data that would be placed on the Clipboard by a call to the CopyToClipboard member function.

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

pDataSource

Pointer to a COleDataSource object that will receive the data contained in the OLE item.

bIncludeLink

TRUE if link data should be included; otherwise FALSE.

lpOffset

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

lpSize

The size of the object in pixels.

GetClipboardData is called as the default implementation of OnGetClipboardData. Override OnGetClipboardData only if you want to offer data formats in addition to those offered by CopyToClipboard. Place those formats in the COleDataSource object before or after calling CopyToClipboard, and then pass the COleDataSource object to the COleDataSource::SetClipboard function. For example, if you want the OLE item's position in its container document to accompany it on the Clipboard, you would define your own format for passing that information and place it in the COleDataSource before calling CopyToClipboard.

Header: afxole.h

Show:
© 2014 Microsoft