Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS OCR C DLL Help

L_DocOffsetZones

Show in webframe

#include "ltdoc.h"

L_LTDOC_API L_INT L_DocOffsetZones(hDoc, pt)

L_HDOC hDoc;

/* handle to the OCR document */

POINT pt;

/* pointer to a POINT structure */

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

Parameter

Description

hDoc

Handle to the OCR document.

pt

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

Returns

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

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

Functions:

L_DocLockPage, L_DocUnlockPage, L_DocSetActivePage, L_DocDrawPage, L_DocSelectZoneByPoint, L_DocSelectZone, L_DocSetZonePen, L_DocSetSelectedZonePen, L_DocRemoveSelectedZone, L_DocGetSelectedZone, L_DocZone

Topics:

OCR Functions: Drawing Zones and Pages

 

Drawing Pages and Zones

Example

 L_INT DocOffsetZonesExample(L_HDOC 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_DocOffsetZones(hDoc, ptScroll);
   if(nRet != SUCCESS)
      return nRet;
   nRet = L_DocSelectZoneByPoint(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;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.