// RecogWords.cpp : implementation file // #include "stdafx.h" #include "msvc5ocr.h" #include "RecogWords.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CRecogWords dialog CRecogWords::CRecogWords(ILEADRasterDocument* pRasterDoc, int nPageIndex, CWnd* pParent /*=NULL*/) : CDialog(CRecogWords::IDD, pParent) { //{{AFX_DATA_INIT(CRecogWords) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT m_nPageIndex = nPageIndex; m_pRasterDoc = pRasterDoc; } void CRecogWords::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CRecogWords) DDX_Control(pDX, IDC_LIST_WORDS, m_lstWords); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CRecogWords, CDialog) //{{AFX_MSG_MAP(CRecogWords) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CRecogWords message handlers BOOL CRecogWords::OnInitDialog() { CDialog::OnInitDialog(); CString csWord; m_pRasterDoc->GetRecognizedWords(m_nPageIndex); int nWordsCount = m_pRasterDoc->GetRecognizedWordsCount(); for(int i=0; iRecognizedWord[i]; csWord = bstrWord; m_lstWords.AddString(csWord); } CString csTitle; csTitle.Format(TEXT("Recognized words for Page # %d"), m_nPageIndex+1); SetWindowText(csTitle); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }