Partager via


RecognizerContext Property

RecognizerContext Property

Gets or sets the InkRecognizerContext object that the InkDivider object uses for layout analysis.

Declaration

[C++]

[propputref] HRESULT putref_RecognizerContext(
    [in] IInkRecognizerContext *RecognizerContext
);
[propget] HRESULT get_RecognizerContext(
    [out,retval] IInkRecognizerContext** theRecognizerContext
);

[Microsoft® Visual Basic® 6.0]

Public Property Get RecognizerContext() As RecognizerContext
Public Property Let RecognizerContext( _
    ByRef theRecognizerContext As RecognizerContext _
)

Property Value

InkRecognizerContext The InkRecognizerContext object that the InkDivider object uses for layout analysis.

This property is read/write.

Return Value

HRESULT value Description
S_OK Success.
E_FAIL An unspecified error occurred.
E_INK_EXCEPTION An exception occurred inside the method.
E_INVALIDARG Invalid argument.
E_POINTER A parameter contains an invalid pointer.
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

If you set the RecognizerContext property, it should be the first thing you do after constructing the InkDivider object. An error is generated if you attempt to set the RecognizerContext property after the Divider.Strokes property has been set, after a Divider.Divide call has been made, or if you attempt to set it more than one time.

In addition, this property generates an error if you assign a recognizer context to it that:

  • Is not a text recognizer.
  • Does not support free input.

If the value of this property is NULL (Nothing in Visual Basic 6.0) when strokes are assigned to the InkDivider object, then the InkDivider object uses no recognizer context.

Note: The InkDivider object uses the default property settings of the InkRecognizerContext object, and ignores any strokes assigned to the InkRecognizerContext object.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example creates a InkDivider object, theDivider, and explicitly assigns the default recognizer context to it.

Dim theInkDivider As New InkDivider
Dim theRecognizers As New InkRecognizers
theInkDivider.RecognizerContext = theRecognizers.GetDefaultRecognizer()

Applies To