Freigeben über


SuffixText Property

SuffixText Property

Gets or sets the characters that come after the InkStrokes collection in the InkRecognizerContext object.

Declaration

[C++]

[C++]
[propput] HRESULT put_SuffixText ([in] BSTR SuffixText);
[propget] HRESULT get_SuffixText ([out, retval] BSTR* SuffixText);

[Microsoft® Visual Basic® 6.0]

[Visual Basic]
Public Property Get SuffixText() As String
Public Property Let SuffixText( _
    ByVal theSuffixText As String)

Property Value

BSTR The characters that come after the InkStrokes collection in the InkRecognizerContext object. Must be less than 1k.

This property is read/write.

For more information about the BSTR data type, see Using the Automation Library.

Return Value

HRESULT value Description
S_OK Success.
E_INK_EXCEPTION An exception occurred inside the method.
E_INVALIDARG The parameter is an invalid pointer.
E_OUTOFMEMORY Cannot allocate memory to complete the operation.
E_POINTER Invalid parameter memory.
E_UNEXPECTED Unexpected parameter or property type.
TPC_E_OUT_OF_ORDER_CALL This property cannot be assigned after strokes have been added to the Strokes property.

Remarks

The suffix helps improve recognition results by supplying the recognizer with more context about the handwriting.

Setting the SuffixText property succeeds only if the Strokes property is NULL (Nothing in Visual Basic 6.0). You must set the SuffixText property before you attach a InkStrokes collection to the Strokes property of the InkRecognizerContext, or you must set the Strokes property to NULL and then set the SuffixText property.

Note: If you use the latter method, you may need to reattach the InkStrokes collection to the Strokes property of the InkRecognizerContext object.

Setting the SuffixText property to NULL removes any suffix text from the recognizer context.

The suffix text is ignored unless you have set both the Coerce and WordMode InkRecognitionModes flags in the RecognitionFlags property.

The PrefixText property gets or sets the characters that come before the InkStrokes collection in the InkRecognizerContext object and also helps improve the recognition result.

If your application provides a correction interface when converting ink to text, the application may allow the user to select characters within a word and use the stylus to generate replacement characters. Your application can use the PrefixText and SuffixText properties to improve recognition of the new ink.

Example

[Visual Basic 6.0]

This Visual Basic 6 example returns the suffix text of the InkRecognizerContext object, theRecognizerContext.

[Visual Basic]
Dim theSuffixText As String
theSuffixText = theRecognizerContext.SuffixText

Applies To