L_DocRemoveZone

#include "ltdoc.h"

L_LTDOC_API L_INT L_DocRemoveZone(hDoc, nPageIndex, nZoneIndex)

L_HDOC hDoc;

/* handle to the OCR document */

L_INT nPageIndex;

/* page index */

L_INT nZoneIndex;

/* zone index */

Removes one or more zones from the zone list for the specified page.

Parameter

Description

hDoc

Handle to the OCR document.

nPageIndex

Specifies the index of the page for which the zone(s) will be deleted. This is a zero-based index.

nZoneIndex

Specifies the index of the zone(s) to be deleted. This is a zero-based index.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The nZoneIndex parameter specifies the zone that will be deleted. If you pass 1 for the nZoneIndex parameter, then this function will delete all zones in the zone list for the specified page.

The index of the first zone in the zone list is zero (0).

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_DocAddZone, L_DocGetZoneCount, L_DocGetZone, L_DocUpdateZone, L_DocImportZones, L_DocExportZones, L_DocFindZones, L_DocSetZoneOptions, L_DocGetZoneOptions

Topics:

OCR Functions: Zones

 

Working with Zones

Example

 L_INT DocRemoveZoneExample(L_HDOC hDoc, L_INT nPageIndex, L_INT nZoneIndex)
{
   L_INT nRet;
   
   nRet = L_DocRemoveZone(hDoc, nPageIndex, nZoneIndex);
   if (nRet == SUCCESS)
      MessageBox(NULL, TEXT("The specified zone is deleted from the specified page."), TEXT("Notice!"), MB_OK);
   else
   {
      MessageBox(NULL, TEXT("The engine couldn't delete the specified zone."), TEXT("Error!"), MB_OK);
      return nRet;
   }
   return SUCCESS;
}