Share via


HwxGetResults (Windows Embedded CE 6.0)

1/6/2010

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

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 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 Value

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

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

HwxResultsAvailable
HWXGUIDE
HWXRESULTS

Other Resources

Handwriting Recognizer Engine (HWX) Functions