HwxSetPartial

This function enables partial recognition for the handwriting recognition engine.

At a Glance

Header file: Recog.h
Windows CE versions: 2.0 and later

Syntax

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 works best in a multithreaded operating environment. This enables a single application process to have one thread collecting ink and another thread processing ink, with both threads sharing the same memory address space. When the collection thread has more ink for the handwriting recognition engine, it can use HwxSetAbort to signal the thread that is processing ink to stop recognition processing. After the additional information has been received and HwxPartial has been used to assess the character, the recognition thread calls HwxProcess to resume processing.

See Also

HwxGetResults, HwxInput, HwxProcess, HwxResultsAvailable, HwxSetAbort