EnableStopRecognizeStatus Example for C++ 5.0 and later

void CSampleSink::OnRecognitionStatus (short iRecogPage, short iError) 
{
   CString csBuffer; 

   csBuffer.Format (TEXT("Recognized page index = %d\nRecognition Return value = %d\n"), iRecogPage, iError); 
   AfxMessageBox(csBuffer); 

   m_pRasterDoc->EnableStopRecognizeStatus = FALSE; 
}

void CSample_COMDlg::OnButton16()
{
   int nLangCount = 0; 
   CString csMsg; 

   nLangCount = pRasterDoc->DefaultSpellLanguagesCount
   csMsg.Format (TEXT("Total Default Spelling Languages = %d"), nLangCount); 
   AfxMessageBox(csMsg); 

   if (nLangCount > 0) 
   {
      if (pRasterDoc->RecognizeModuleTradeoff != RECOG_MODULE_ACCURATE) 
         pRasterDoc->RecognizeModuleTradeoff = RECOG_MODULE_ACCURATE; 

      pRasterDoc->EnableSubSystem = TRUE; 
      pRasterDoc->EnableCorrection = TRUE; 
      pRasterDoc->SpellLanguageID = pRasterDoc->DefaultSpellLanguages [0]; 
      pRasterDoc->EnableFireRecognizeStatus = TRUE; 
      pRasterDoc->EnableSaveResultsToMemory = TRUE; 
      pRasterDoc->RecognitionDataFileName = "c:\\testrdf.rdf";

      pRasterDoc->Recognize (0, 1); 
   }
}