Recognize 

1.0     2.0     

Begins sampling pen data and converts tablet input to recognized symbols.

 

Note  This function is provided only for compatibility with version 1.0 of the Pen API and will not be supported in future versions.

 

REC Recognize( LPRC lprc )

Parameters

lprc

Address of an RC232HBHC structure.

Return Value

Returns an REC_ value. See the  Comments  section for a description of the return values.7

Comments

The RC structure that lprc points to contains the parameters that control recognition. The system sends recognition results via the WM_RCRESULT message to the window indicated by the hwnd member of the RC. All results messages are sent before Recognize returns. Multiple result messages can be sent if the application asks for results to be sent to the application before all input has been completed (as indicated by the wResultMode member of the RC structure).

An application that uses version 1.0 recognizers should call Recognize when the input session begins, signaled by the WM_LBUTTONDOWN message.

The value REC_OK is used in the wParam of the WM_RCRESULT message to indicate that more data is coming. Return values of greater than 0 signal normal successful completion. Return values of less than 0 indicate abnormal termination. Return values of less than REC_DEBUG are reserved for return values from

debugging versions of the system or recognizer. If an application creates a condition that would be caught in a debugging version while running a nondebugging version, the results are undefined.

Each return value can be the wParam value of the WM_RCRESULT message or the return value for Recognize. The wParam value of the last WM_RCRESULT message generated by a call to Recognize is the return value of Recognize. Some error conditions, such as REC_OOM or REC_NOTABLET, are returned without generating any corresponding WM_RCRESULT message.

All of the values listed in the following table are in the debug version only. No WM_RCRESULT message is generated if these values are returned by Recognize.

Constant

Description

REC_ALC

Invalid enabled alphabet.

REC_BADEVENTREF

Returned when the wEventRef member in the lprc structure is invalid.

REC_CLVERIFY

Invalid verification level.

REC_DEBUG

All debugging return values are less than this.

REC_DICT

Invalid dictionary parameters.

REC_ERRORLEVEL

Invalid error level.

REC_GUIDE

Invalid GUIDE1AOCW. structure.

REC_HREC

Invalid recognition handle.

REC_HWND

Invalid handle to window to send results to.

REC_INVALIDREF

Invalid data reference parameter.

REC_LANGUAGE

Returned by the recognizer when the lpLanguage member contains a language that is not supported
by the recognizer. Call ConfigRecognizer232HADD with the WCR_QUERYLANGUAGE subfunction to determine whether a particular language is supported.

REC_NOCOLLECTION

In version 1.0, was returned by GetPenHwData if collection mode has not been set. Not used now.

REC_OEM

Error codes less than or equal to REC_OEM are specific to the recognizer.

REC_PCM

Invalid lPcm member in the RC232HBHC structure. There is no way for the recognition to end.

REC_RECTBOUND

Invalid rectangle.

REC_RECTEXCLUDE

Invalid rectangle.

REC_RESULTSMODE

Unsupported results mode requested.

 

See Also

InitRC, RecognizeData, GetPenHwEventData, RC