GetZoneInfo Example for C++ 5.0 and later
void CSample_COMDlg::OnButton10()
{
ILTZoneData* pZoneData = NULL;
HRESULT hr = CoCreateInstance(CLSID_LTZoneData, NULL, CLSCTX_ALL, IID_ILTZoneData, (void**)&pZoneData);
if (FAILED(hr))
{
AfxMessageBox(TEXT("Can't instantiate the OCR COM Object..."));
return;
}
int nRet = pRasterDoc->GetZoneInfo (0, 0, pZoneData);
if (nRet == 0)
{
AfxMessageBox(TEXT("The engine retrieved the specified zone information successfully."));
pZoneData->FillMethod = FM_OCRA;
pZoneData->Type = ZONE_TYPE_GRAPHIC;
nRet = pRasterDoc->UpdateZone (0, 0, pZoneData);
if(nRet == 0)
AfxMessageBox(TEXT("The specified zone is updated."));
}
pZoneData->Release();
}