Partager 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. 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 Values

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

OS Versions: Windows CE .NET 4.0 and later.
Header: Recog.h.
Link Library: Hwxjpn.lib, Hwxusa.lib, Hwxcht.lib, Hwxkor.lib.

See Also

HwxGetResults | HwxInput | HwxProcess | HwxResultsAvailable | HwxSetAbort

 Last updated on Friday, April 09, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.