IInkDisp::ClipboardCopy method (msinkaut.h)

Copies the InkStrokes collection to the Clipboard.

Syntax

HRESULT ClipboardCopy(
  [in, optional] IInkStrokes         *strokes,
  [in, optional] InkClipboardFormats ClipboardFormats,
  [in, optional] InkClipboardModes   ClipboardModes,
  [out, retval]  IDataObject         **DataObject
);

Parameters

[in, optional] strokes

Optional. Specifies the strokes to copy. If the strokes parameter is NULL, the ClipboardCopy method copies the entire InkDisp object. The default value is NULL.

[in, optional] ClipboardFormats

Optional. Specifies the InkClipboardFormats enumeration value of the InkDisp object. The default value is ICF_Default.

[in, optional] ClipboardModes

Optional. Specifies the InkClipboardModes enumeration value of the InkDisp object. The default value is ICB_Default.

[out, retval] DataObject

When this method returns, contains a pointer to the newly create data object.

Return value

This method can return one of these values.

Return code Description
S_OK
Success.
E_POINTER
A parameter contained an invalid pointer.
E_INK_EXCEPTION
An exception occurred inside the method.
E_INK_MISMATCHED_INK_OBJECT
The strokes parameter is associated with a different Ink object.

Remarks

This method copies all properties of the stroke, including recognition results. Setting the strokes parameter to NULL copies the InkDisp object to the Clipboard, including the CustomStrokes property, and recognition results for strokes in the InkDisp object's IInkCustomStrokes collection are maintained.

If an empty InkStrokes collection is passed, the method returns NULL and the contents of the Clipboard are not modified.

Note  OleInitialize(NULL) must be called before the clipboard APIs can work.
 
Caution  To avoid potential memory leaks as a result of using the ICB_DelayedCopy flag, you must call the OleFlushClipboard or OleSetClipboard method. This must be done before the application exits if the last call to the ClipboardCopy method used the ICB_DelayedCopy flag.
 

Requirements

Requirement Value
Minimum supported client Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header msinkaut.h
Library InkObj.dll

See also

ClipboardCopyWithRectangle Method

IInkDisp

InkClipboardFormats Enumeration

InkClipboardModes Enumeration

InkDisp Class

InkStrokes Collection