Share via


CRichEditView::GetClipboardData

The framework calls this function as part of the processing of IRichEditOleCallback::GetClipboardData.

virtual HRESULT GetClipboardData( 
   CHARRANGE* lpchrg, 
   DWORD dwReco, 
   LPDATAOBJECT lpRichDataObj, 
   LPDATAOBJECT* lplpdataobj  
);

Parameters

  • lpchrg
    Pointer to the CHARRANGE structure specifying the range of characters (and OLE items) to copy to the data object specified by lplpdataobj.

  • dwReco
    Clipboard operation flag. Can be one of these values.

    • RECO_COPY   Copy to the Clipboard.

    • RECO_CUT   Cut to the Clipboard.

    • RECO_DRAG   Drag operation (drag and drop).

    • RECO_DROP   Drop operation (drag and drop).

    • RECO_PASTE   Paste from the Clipboard.

  • lpRichDataObj
    Pointer to an IDataObject object containing the Clipboard data from the rich edit control (IRichEditOle::GetClipboardData).

  • lplpdataobj
    Pointer to the pointer variable that receives the address of the IDataObject object representing the range specified in the lpchrg parameter. The value of lplpdataobj is ignored if an error is returned.

Return Value

An HRESULT value reporting the success of the operation. For more information on HRESULT, see Structure of COM Error Codes in the Windows SDK.

Remarks

If the return value indicates success, IRichEditOleCallback::GetClipboardData returns the IDataObject accessed by lplpdataobj; otherwise, it returns the one accessed by lpRichDataObj. Override this function to supply your own Clipboard data. The default implementation of this function returns E_NOTIMPL.

This is an advanced overridable.

For more information, see IRichEditOle::GetClipboardData, IRichEditOleCallback::GetClipboardData, and CHARRANGE in the Windows SDK and see IDataObject in the Windows SDK.

Requirements

Header: afxrich.h

See Also

Reference

CRichEditView Class

Hierarchy Chart

COleServerItem::GetClipboardData