IInkRecognitionResult::ModifyTopAlternate method (msinkaut.h)

Changes the top alternate of a recognition result by using the specified alternate.

Syntax

HRESULT ModifyTopAlternate(
  [in] IInkRecognitionAlternate *Alternate
);

Parameters

[in] Alternate

The IInkRecognitionAlternate to use to modify the top alternate.

Return value

This method can return one of these values.

Return code Description
S_OK
Success.
TPC_E_NOT_RELEVANT
The lattice does not contain data.
E_POINTER
A parameter contained an invalid pointer.
E_INVALIDARG
The alternate does not match the known range, or it was not obtained from this lattice.
E_INK_EXCEPTION
An exception occurred while processing.
E_OUTOFMEMORY
Cannot allocate memory to complete the operation.

Remarks

By default, the best result string of the recognition result corresponds to the top alternate. However, you can use this method to specify that alternates other than the top alternate are used in the result. When you choose an alternate other than the top alternate, you are essentially choosing a different path through the lattice of alternates that are associated with the results.

To retrieve the alternates that can be used to modify the recognition result, call the AlternatesFromSelection method.

Note  A call to ModifyTopAlternate Method may modify the TopString and TopAlternate properties.
 
The alternate used in the function can be a word alternate in an entire sentence. For example, an alternate obtained by using AlternatesFromSelection (0, 5) for "Hello World" only changes the "Hello" part of the word leaving the "World" part intact.

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

GetAlternatesFromSelection Method

IInkRecognitionAlternate Interface

IInkRecognitionResult Interface

TopAlternate Property

TopString Property