L_Doc2OffsetZones

#include "ltdoc2.h"

L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2OffsetZones(hDoc, pt)

Scrolls the zones of the currently displayed page, by the specified values.

Parameters

L_HDOC2 hDoc

Handle to the OCR document.

POINT pt

POINT structure that contains values that represent the amount of vertical and horizontal scrolling.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

When a page is scrolled, the zones on that page must also be scrolled and redrawn in their new locations, relative to the page. The amount the page was scrolled indicates the amount by which the zones must be scrolled. This amount is specified in the X and Y parameters.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT Doc2OffsetZonesExample(L_HDOC2 hDoc,HWND hWnd) 
{ 
   L_INT nRet; 
   HDC hdc = GetDC(hWnd); 
   L_INT nSelZone; 
   POINT pt; 
   POINT ptScroll; 
 
   ptScroll.x = 0; 
   ptScroll.y = 0; 
 
   pt.x = 450; 
   pt.y = 400; 
 
   nRet = L_Doc2OffsetZones(hDoc, ptScroll); 
   if(nRet != SUCCESS) 
      return nRet; 
   nRet = L_Doc2SelectZoneByPoint(hDoc, hdc, 0, pt, &nSelZone); 
   if (nRet == SUCCESS) 
   { 
      L_TCHAR szBuffer[200]; 
      ZeroMemory(szBuffer, sizeof(szBuffer)); 
 
      wsprintf(szBuffer, TEXT("The selected zone index = %d\n"), nSelZone); 
      MessageBox(NULL, szBuffer, TEXT("Notice!"), MB_OK); 
   } 
   else 
      return nRet; 
 
   ReleaseDC(hWnd, hdc); 
   return SUCCESS; 
} 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - OmniPage Engine C API Help