Factoid Property
Factoid Property |
Gets or sets the Factoid constant that a IInkRecognizer object uses to constrain its search for the recognition result.
Declaration
[C++]
[propput] HRESULT put_Factoid ([in] BSTR Factoid);
[propget] HRESULT get_Factoid ([out, retval] BSTR* Factoid);
[Microsoft® Visual Basic® 6.0]
Public Property Get Factoid() As String
Public Property Let Factoid(ByVal theFactoid As String)
Property Value
BSTR The factoid that a recognizer uses to constrain its search for the recognition result.
This property is read/write.
For more information about the BSTR data type, see Using the Automation Library.
Return Value
This property sets or gets the factoid type of the recognizer context.
HRESULT value | Description |
---|---|
S_OK | Success. |
TPC_E_INVALID_PROPERTY | The specified Factoid is not supported. |
TPC_E_OUT_OF_ORDER_CALL | This property cannot be assigned after strokes have been added to the InkEdit control. |
E_NOTIMPL | The IInkRecognizer object does not support this method. |
E_OUTOFMEMORY | Cannot allocate memory to complete the operation. |
E_FAIL | An unspecified error occurred. |
E_INK_EXCEPTION | An exception occurred. |
E_INVALIDARG | The context is invalid or the parameter is an invalid pointer. |
E_UNEXPECTED | Unexpected property type. |
Remarks
This property should only be changed if the Status property returns IES_Idle.
To ensure that ink is recognized in the correct field context, set this property before processing the ink for the first time.
A Factoid provides context for recognized ink in the context of a particular field. You specify a factoid if an input field is of a known type, for example, if the input field contains a date.
This property takes or returns a string parameter and not a class object of the Factoid class. The members of this class are of type string. This method does not throw an error if you attempt to set this property to an invalid string value.
Note: All factoids are case sensitive.
For more information about factoids and how to use them, see Improving Tablet PC Recognition Accuracy by Setting Context. For a list of supported factoids, see Factoid Constants and Supported Factoids from Version 1.
Example
[Visual Basic 6.0]
This Visual Basic 6.0 example sets the Factoid property of a recognizer context to bias recognition toward postal codes for the input to an InkEdit control, theInkEdit .
theInkEdit.Factoid = "POSTALCODE"