GetRecognizedWords Example for Visual Basic

void CSample_COMDlg::TestGetRecognizedWords()
{
   CString csBuffer; 

   pRasterDoc->GetRecognizedWords(0); 
   int nWordsCount = pRasterDoc->RecognizedWordsCount
   for(int i=0; i<nWordsCount; i++)
   {
      BSTR bstrWord = pRasterDoc->RecognizedWord[i]; 
      CString csWord = bstrWord; 

      csBuffer.Format(TEXT("Word = %s\nZone Index = %d\nArea {%d, %d, %d, %d}"),
                      csWord, 
                      pRasterDoc->RecognizedWordZone[i], 
                      pRasterDoc->RecognizedWordLeft[i], 
                      pRasterDoc->RecognizedWordTop[i], 
                      pRasterDoc->RecognizedWordWidth[i] + pRasterDoc->RecognizedWordLeft[i], 
                      pRasterDoc->RecognizedWordHeight[i] + pRasterDoc->RecognizedWordTop[i]); 
      AfxMessageBox(csBuffer); 
   }
}