Share via


HwxSetPartial

This function enables partial recognition for the handwriting recognition engine.

BOOL HwxSetPartial ( 
HRC hrc, 
UINT urecog );

Parameters

  • hrc
    [in] Handle for the handwriting recognition context (HRC) object.
  • urecog
    [in] Value for the partial recognition parameter. It is one of the following values:
    Value Description
    HWX_PARTIAL_ALL All strokes are input before recognition occurs, effectively turning off partial recognition.
    HWX_PARTIAL_ORDER Partial recognition processing is based on the assumption that first strokes entered by the user are the beginning of the character, and the remaining strokes are drawn in their correct order.
    HWX_PARTIAL_FREE Partial recognition processing is based on the assumption that the user may draw the character strokes in random order.

Return Values

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError.

Remarks

When an application enables partial recognition, an application makes multiple calls to HwxProcess for a single character. When partial recognition is not enabled, an application calls HwxProcess once after an application collects all user input, or ink, for a character.

Use HwxSetPartial to enable partial recognition before calling HwxInput and HwxProcess to process ink.

Partial recognition enables the handwriting recognition engine to return choices even when the user incorrectly or partially writes a character or glyph. This benefits the user, who can enter complex characters without having to remember the exact order or number of necessary strokes. Partial recognition is available for processing complex characters, such as those used in the Japanese, Chinese, and Korean languages. For languages that consist of simple characters, such as European languages, partial recognition is not available.

A complex character is made up of many strokes. A stroke consists of three events: stylus down on the input panel, stylus movement, and stylus up. When a user starts drawing the first strokes of a complex character and partial recognition is enabled, an application calls HwxInput to supply ink to the HRC. A call to HwxProcess signals the handwriting recognition engine to start processing ink. An application can then call HwxResultsAvailable to see if the recognition engine has a possible match for the character. If results are available, an application calls HwxGetResults and displays the result to the user. The user can confirm the character and begin drawing the next character, or continue drawing the current character until it is correctly identified by the recognition engine.

Partial recognition is most effective in a multi-threaded operating environment: here, a single application process has two threads, one to collect ink and another thread to process the ink; both threads share the same memory address space. When the collection thread has more ink for the handwriting-recognition engine, it can use HwxSetAbort to signal the ink-processing thread to stop. The ink-collection process then receives the new data, and runs HwxSetPartial to assess the new ink data. Finally, the recognition thread calls HwxProcess to resume processing.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Recog.h   Hwxjpn.lib, Hwxusa.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

HwxGetResults, HwxInput, HwxProcess, HwxResultsAvailable, HwxSetAbort

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.