Share via


TopAlternate Property

TopAlternate Property

Gets the top alternate of the recognition result.

Declaration

[C++]

[C++]
[propget] HRESULT get_TopAlternate([out,retval]IInkRecognitionAlternate** TopAlternate);

[Microsoft® Visual Basic® 6.0]

[Visual Basic]
Public Property Get TopAlternate() As InkRecognitionAlternate

Property Value

InkRecognitionAlternate The top alternate of the recognition result.

This property is read-only.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The TopAlternate parameter is an invalid pointer.
E_OUTOFMEMORY Cannot allocate memory to complete the operation.
E_INK_EXCEPTION An exception occurs inside the method.
E_UNEXPECTED Unexpected object property type.

Remarks

When the recognizer returns a recognition result, the recognition alternates are ranked from the highest confidence level to the lowest confidence level. The recognition alternate with the highest confidence level is selected as the top alternate.

You can use the ModifyTopAlternateMethod method to change which recognition alternate is the top alternate.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example copies the text of the best alternate of a IInkRecognitionResult, theRecognitionResult, into a text box, theTextBox.

[Visual Basic]
theTextBox.Text = theRecognitionResult.TopAlternate.String

Applies To