Draws a selection rectangle around the zone located at the specified point.
Handle to the OCR document.
Handle to a device context, such as a screen, to use as the display surface. The mapping mode of the device context must be MM_TEXT.
Index of the page that contains the zones. This index is zero-based.
The X and Y coordinates for a point inside a zone.
Pointer to a variable to be updated with the index of the selected zone.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
This function will return the selected zone index if it finds a zone that contains the specified point.
Required DLLs and Libraries
L_INT Doc2SelectZoneByPointExample(L_HDOC2 hDoc, HWND hWnd)
HDC hdc = GetDC(hWnd);
L_INT nSelZone = 0;
pt.x = 450;
pt.y = 400;
nRet = L_Doc2SelectZoneByPoint(hDoc, hdc, 0, pt, &nSelZone);
if (nRet == SUCCESS)
wsprintf(szBuffer, TEXT("The selected zone index = %d\n"), nSelZone);
MessageBox(NULL, szBuffer, TEXT("Notice!"), MB_OK);