StopVerificationEvent Example for C++ 5.0 and later
void CSampleZoneSink::Verification(short iZoneIndex, BSTR bstrWord)
{
//...
//... Set your code here
//...
m_pZoneData->VerifyCode = VF_ACCEPT;
m_pRasterDoc->StopVerificationEvent = FALSE;
}
void CSample_COMDlg::OnButton8()
{
int nZoneCount = 0;
CString csBuffer;
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;
}
pZoneData->Left = 100;
pZoneData->Top = 100;
pZoneData->Right = 200;
pZoneData->Bottom = 200;
pZoneData->FillMethod = FM_DEFAULT;
pZoneData->RecognizeModule = RECOGNIZE_MODULE_AUTO;
pZoneData->CharacterFilter = CHAR_FILTER_DEFAULT;
pZoneData->Type = ZONE_TYPE_FLOWTEXT;
pZoneData->Flags = 0;
pZoneData->EnableVerificationEvent = TRUE;
pZoneData->SectionName = "cities";
int nRet = pRasterDoc->AddZone(0, 0, pZoneData);
if (nRet == 0)
{
CString csMsg;
csMsg.Format (TEXT("The engine added a new zone to the document successfully.\nThe Added Zone ID = %d\n"),
pZoneData->ID);
AfxMessageBox(csMsg);
}
else
AfxMessageBox(TEXT("The engine could not add a new zone to the document."));
nZoneCount = pRasterDoc->ZoneCount [0];
csBuffer.Format (TEXT("Total zones in the specified page: %d"),nZoneCount);
pZoneData->Release();
}