HwxGetResults (Windows CE 5.0)

Send Feedback

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

INT32 HwxGetResults( HRChrc,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 zero, the function returns zero.
  • 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 specifies 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.

#define MAX_HWXRESULT   10


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

do
  {
    int iRes = HwxGetResults ( hrc, 5, indx, MAX_HWXRESULT, rgBoxR);
        if( HRCR_ERROR == iRes )
     {
      break;
      }
  if( (0 < iRes ) && (MAX_HWXRESULT > iRes) )
      {
       indx += (UINT) iRes;
      }
  else
     {
// The index is not valid for the memory that was allocated.
// report an error and exit the loop.
     }
}
while (iRes == 10);

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

HwxResultsAvailable | HWXGUIDE | HWXRESULTS

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.