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
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database