IInkRecognitionAlternate::GetStrokesFromStrokeRanges method (msinkaut.h)

Retrieves the smallest InkStrokes collection that contains a known input InkStrokes collection and for which the IInkRecognizer object can provide alternates.

Syntax

HRESULT GetStrokesFromStrokeRanges(
  [in]          IInkStrokes *Strokes,
  [out, retval] IInkStrokes **GetStrokesFromStrokeRanges
);

Parameters

[in] Strokes

The collection of stroke objects to use to find the smallest stroke collection of the recognition result alternate that contains this collection.

[out, retval] GetStrokesFromStrokeRanges

When this method returns, contains a pointer to the smallest collection of strokes that contains a known input collection of strokes and for which the recognizer can provide alternates.

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.
E_FAIL
An unspecified error occurred.

Remarks

The returned collection may match the input collection, or it may be larger if the input collection matches only part of the smallest recognition result that includes all of the input strokes.

This method is most useful for single-click word selection. For example, to return the strokes that make up the word you clicked, you can click a stroke, call the HitTest method of the IInkStrokeDisp object to retrieve the stroke that was clicked, and then call GetStrokesFromStrokeRanges.

The stroke ranges are valid until the InkDisp object is modified.

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

GetStrokesFromTextRange Method

GetTextRangeFromStrokes Method

IInkRecognition Alternate Interface

InkStrokes Collection