// AnalyzeBox.cpp : implementation file // #include "stdafx.h" #include "LabRat.h" #include "AnalyzeBox.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // AnalyzeBox dialog AnalyzeBox::AnalyzeBox(CWnd* pParent /*=NULL*/) : CDialog(AnalyzeBox::IDD, pParent) { //{{AFX_DATA_INIT(AnalyzeBox) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void AnalyzeBox::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(AnalyzeBox) // NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(AnalyzeBox, CDialog) //{{AFX_MSG_MAP(AnalyzeBox) ON_WM_CLOSE() ON_WM_PAINT() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // AnalyzeBox message handlers void AnalyzeBox::OnClose() { CDialog::OnClose(); DestroyWindow(); delete this; } void AnalyzeBox::OnPaint() { CPaintDC dc(this); // device context for painting // TODO: Add your message handler code here // Do not call CDialog::OnPaint() for painting messages } void AnalyzeBox::AddString(CString message) { CListBox* pList = (CListBox*)GetDlgItem(IDC_INFO_LIST); SetTopIndex(pList->AddString(message)); //pList->AddString(message); } void AnalyzeBox::SetTopIndex(int index) { CListBox* pList = (CListBox*)GetDlgItem(IDC_INFO_LIST); pList->SetTopIndex(index); }