IInkDisp::ExtractStrokes

4/8/2010

Extracts strokes from an IInkDisp object and cuts or copies them into a new IInkDisp object, by using the given IInkStrokes collection to determine which strokes to extract.

Syntax

HRESULT ExtractStrokes (
  IInkStrokes* strokes,
  InkExtractFlags extractFlags,
  IInkDisp **extractedInk
);

Parameters

  • strokes
    [in, optional] Specifies the collection of strokes to extract. The default value of 0 specifies that all strokes are extracted.
  • extractFlags
    [in, optional] Specifies the InkExtractFlags enumeration type, which specifies whether the ink is cut or copied into the new IInkDisp object. The default value of IEF_Default cuts the strokes.
  • extractedInk
    [out, retval] Returns a new IInkDisp object that contains the extracted collection of cut or copied strokes.

Return Value

  • S_OK
    Success.
  • E_POINTER
    A parameter contained an invalid pointer.
  • E_INK_MISMATCHED_INK_OBJECT
    The IInkDisp object of the IInkStrokes collection must match the known IInkDisp object.
  • E_INK_SOME_STROKES_NOT_EXTRACTED
    Not all strokes were extracted.
  • E_OUTOFMEMORY
    Cannot allocate memory to complete the operation.
  • E_INVALIDARG
    Invalid extraction flags.
  • REGDB_CLASSNOTREG
    The IInkDisp object class not registered.

Remarks

The new IInkDisp object retains the drawing attributes, properties, and coordinates of the original IInkDisp object.

This method is useful for creating a new IInkDisp object without the deleted or cut strokes from the original object.

Requirements

Header msinkaut.h
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile 6 Classic and later, Windows Mobile 6 Professional and later

See Also

Concepts

Windows Mobile Ink Reference