This topic has not yet been rated - Rate this topic

InkDisp.ClipboardCopy method

Applies to: desktop apps only

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

strokes [in, optional]

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.

ClipboardFormats [in, optional]

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

ClipboardModes [in, optional]

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

DataObject [out, retval]

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

Return value

This method can return one of these values.

Return codeDescription
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

Minimum supported client

Windows XP Tablet PC Edition

Minimum supported server

None supported

Header

Msinkaut.h (also requires Msinkaut_i.c)

Library

InkObj.dll

See also

InkDisp Class
ClipboardCopyWithRectangle Method
InkClipboardFormats Enumeration
InkClipboardModes Enumeration
InkStrokes Collection

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.