DefaultSpellLanguagesCount Example for C++ 5.0 and later

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

   nLangCount = pRasterDoc->DefaultSpellLanguagesCount
   csMsg.Format (TEXT("Total Default Spell 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); 
   }
}