HwxSetPartial (Windows Embedded CE 6.0)

1/6/2010

This function enables partial recognition for the handwriting recognition engine.

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. The following table shows the values for this parameter.

    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 Value

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

Remarks

When an application enables partial recognition, an application makes multiple calls to the HwxProcess function 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 the HwxInput function 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 the HwxResultsAvailable function to see if the recognition engine has a possible match for the character. If results are available, an application calls the HwxGetResults function 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 the recognition engine correctly identifies it.

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 the HwxSetAbort function 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

Header recog.h
Library hwxcht.lib, Hwxjpn.lib, Hwxkor.lib, hwxusa.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

HwxGetResults
HwxInput
HwxProcess
HwxResultsAvailable
HwxSetAbort

Other Resources

Handwriting Recognizer Engine (HWX) Functions