|
GetBoxResultsHRC
2.0
Encapsulates recognizer functionality for boxed input.
int GetBoxResultsHRC( HRC hrc, UINT cAlt, UINT iSyv, UINT cBoxRes, LPBOXRESULTS rgBoxResults, BOOL fGetInkset )
Parameters
hrc
Handle to the HRC object used for the boxed input.
cAlt
Count of alternatives expected in the BOXRESULTS structure. If this parameter is 0, the function returns 0.
iSyv
Index to the starting symbol.
cBoxRes
The count of BOXRESULTS structures that the rgBoxResults array can hold. This parameter must be greater than 0.
rgBoxResults
Address of an array of BOXRESULTS structures.
fGetInkset
Flag to request inksets for each result if TRUE. If FALSE, the recognizer
provides no inksets.
Return Value
Returns the count of BOXRESULTS elements returned in the rgBoxResults structure, if successful; otherwise, returns one of the following negative
values:
Constant
| Description
| HRCR_ERROR
| Invalid parameter or other error.
| HRCR_INVALIDGUIDE
| The guide structure is invalid.
| HRCR_MEMERR
| Insufficient memory.
| HRCR_HOOKED
| A hook preempted the result.
| HRCR_UNSUPPORTED
| The recognizer does not support this function.
|
Comments
GetBoxResultsHRC simplifies the task of boxed recognition by providing character alternatives
on a per-box basis in one call.
If fGetInkset is TRUE, the recognizer assigns a valid inkset handle to the hinksetBox member of the BOXRESULTS structure addressed by rgBoxResults. It is the application's responsibility to destroy these inksets with DestroyInkset.
Example
The following code sample gets results for 10 boxes at a time, with five
alternatives per box:
HANDLE hMem = GlobalAlloc( GHND, 10 * (sizeof( BOXRESULTS )
+ (5-1) * sizeof( SYV )) );
LPBOXRESULTS rgBoxR = (LPBOXRESULTS)GlobalLock( hMem );
UINT indx = 0;
do
{
int cRes = GetBoxResultsHRC( hrc, 5, indx, 10, rgBoxR, FALSE );
.
. // Check for errors and use rgBoxR
.
indx += (UINT)cRes;
}
while (cRes == 10);
See Also
GetBoxMappingHRCRESULT, GetResultsHRC, DestroyInkset
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|