L_DocZone
#include "ltdoc.h"
L_LTDOC_API L_INT L_DocZone(hDoc, nPageIndex, nZoneIndex, lpArea)
L_HDOC hDoc; |
/* handle to the OCR document */ |
L_INT nPageIndex; |
/* page index */ |
L_INT nZoneIndex; |
/* zone index */ |
LPRECT lpArea; |
/* pointer to a RECT structure */ |
Updates the specified zone area.
Parameter |
Description |
hDoc |
Handle to the OCR document. |
nPageIndex |
Page index. This index is zero-based. |
nZoneIndex |
Zone index that will be updated. This index is zero-based. |
lpArea |
Pointer to the Windows RECT structure which contains the new zone area. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Updates the specified zone area in the specified page.
To update general zone information, call L_DocUpdateZone.
Required DLLs and Libraries
LTDOC For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Example
L_INT DocZoneExample(L_HDOC hDoc,HWND hWnd) { L_INT nRet; HDC hdc = GetDC(hWnd); L_INT nSelZone = 0; POINT pt; pt.x = 450; pt.y = 400; nRet = L_DocSelectZoneByPoint(hDoc, hdc, 0, pt, &nSelZone); if (nRet == SUCCESS) { ZONEDATA ZoneData; ZeroMemory(&ZoneData, sizeof(ZONEDATA)); // gets the zone data for the current selected zone... nRet = L_DocGetSelectedZone(hDoc, 0, &ZoneData, sizeof(ZONEDATA)); if (nRet == SUCCESS) { // update the area for the current selected zone... ZoneData.rcArea.left += 10; ZoneData.rcArea.top += 10; ZoneData.rcArea.right += 50; ZoneData.rcArea.bottom += 50; nRet = L_DocZone(hDoc, 0, nSelZone, &ZoneData.rcArea); if (nRet == SUCCESS) MessageBox(NULL, TEXT("The selected zone area is updated."), TEXT("Notice!"), MB_OK); } else return nRet; ReleaseDC(hWnd, hdc); } else return nRet; return SUCCESS; }