Share via


IInkStrokeDisp::Split

4/8/2010

Splits the IInkStrokeDisp stroke object at the specified location on the stroke.

Syntax

HRESULT Split (
  [in] float index,
  [out, retval] IInkStrokeDisp **NewStroke
);

Parameters

  • index
    The floating point index value that represents where to split the stroke.

    Note

    A floating point index is a float value that represents a location somewhere between two points in the stroke. As examples, if 0.0 is the first point in the stroke and 1.0 is the second point in the stroke, 0.5 is halfway between the first and second points. Similarly, a floating point index value of 37.25 represents a location that is 25 percent along the line between points 37 and 38 of the stroke.

  • NewStroke
    Returns the new IInkStrokeDisp object that is created from the split operation.

Return Value

HRESULT value Description

S_OK

Success.

E_POINTER

A parameter contained an invalid pointer.

E_OUTOFMEMORY

Cannot allocate Stroke handler helper object.

E_INVALIDARG

The parameter is invalid.

E_UNEXPECTED

Unexpected parameter or property type.

E_INK_EXCEPTION

An exception occurred inside the method.

Remarks

This method inserts the new stroke immediately after the original stroke in the stroke set and renumbers the remaining stroke indices.

When an IInkStrokeDisp is split, the beginning portion of the stroke remains the ID of the original IInkStrokeDisp. The end portion of the IInkStrokeDisp becomes a new IInkStrokeDisp with an ID that is one greater than the highest IInkStrokeDisp ID. If the original IInkStrokeDisp was in an IInkStrokes collection (other than IInkDisp::Strokes), only the beginning portion remains in that collection.

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