IInkRecognitionAlternate::GetTextRangeFromStrokes method (msinkaut.h)

Retrieves the smallest range of recognized text for which the recognizer can return an alternate that contains a known InkStrokes collection.

Syntax

HRESULT GetTextRangeFromStrokes(
  [in]      IInkStrokes *Strokes,
  [in, out] long        *selectionStart,
  [in, out] long        *selectionLength
);

Parameters

[in] Strokes

The collection of strokes for which to find the containing alternate.

[in, out] selectionStart

The start position of the range of recognized text within the alternate object on which this method was called that matches the smallest alternate that contains the passed-in strokes.

[in, out] selectionLength

When this method returns, contains the length of the text within the range of recognized text of the smallest alternate that contains the passed-in strokes.

Return value

If successful, returns S_OK; otherwise, returns an HRESULT error code.

Remarks

Use this method to retrieve the text that corresponds to a specified range of strokes. For example, consider a collection of strokes, "how are you", that was drawn using nine strokes (one for each letter and three for each word). If a collection that consists of the sixth and seventh strokes is passed in, corresponding to characters "e" and "y", the text range returned matches the alternate containing "are you" and the selection start and length matches this substring.

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

GetStrokesFromStrokeRanges Method

GetStrokesFromTextRange Method

IInkRecognition Alternate Interface

InkStrokes Collection