HwxGetResults

This function retrieves the handwriting recognition engine results from the specified handwriting recognition context (HRC).

At a Glance

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

Syntax

INT32 HwxGetResults ( HRC hrc, UINT cAlt, UINT iFirst, UINT cBoxRes,
HWXRESULTS
* rgBoxResults );

Parameters

hrc

[in] Handle to the handwriting recognition context (HRC).

cAlt

[in] Number of alternate results expected in the HWXRESULTS structure. If this parameter is 0, the function returns 0.

iFirst

[in] Index of the first character to return.

cBoxRes

[in] Number of characters to return.

rgBoxResults

[out] Array of ranked lists, one list per returned character, that specify results.

Return Values

The number of characters actually returned indicates success. HRCR_ERROR indicates failure.

Remarks

Before calling HwxGetResults, an application can call the HwxResultsAvailable function to find out how many characters are available from the handwriting recognition engine.

When the HWXGUIDE structure defines multiple input boxes, HwxGetResults provides character alternatives on a per-box basis in one call. The rgBoxResults buffer that was passed in contains the results for the returned characters. While the user is still entering characters in the current HRC, an application can use this function to display processed characters. An application can call this function repeatedly.

The following code example shows how to simultaneously retrieve results for 10 input boxes, with five alternatives per box.

HANDLE hMem = GlobalAlloc(GHND, 10 * (sizeof(HWXRESULTS) + (5-1) * sizeof(WCHAR)) );
HWXRESULTS * rgBoxR = (HWXRESULTS * ) GlobalLock( hMem);

do
{
   int iRes = HwxGetResults ( hrc, 5, indx, 10, rgBoxR);
   .
   .            // check for errors and use rgBoxR
   .
   indx += (UINT) iRes;
}
while (iRes == 10);

See Also

HWXRESULTS,HwxResultsAvailable