// ResLog.cpp : implementation file // #include "stdafx.h" #include "dclient.h" #include "ResLog.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CResultsLog dialog CResultsLog::CResultsLog(CWnd* pParent /*=NULL*/) : CDialog(CResultsLog::IDD, pParent) { //{{AFX_DATA_INIT(CResultsLog) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT m_bClear=FALSE; m_pResList=NULL; } void CResultsLog::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CResultsLog) DDX_Control(pDX, IDC_LIST1, m_ResultsList); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CResultsLog, CDialog) //{{AFX_MSG_MAP(CResultsLog) ON_BN_CLICKED(IDC_BUTTON1, OnButton1) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CResultsLog message handlers void CResultsLog::OnButton1() { m_ResultsList.ResetContent(); m_bClear=TRUE; } BOOL CResultsLog::OnInitDialog() { CDialog::OnInitDialog(); long x; CString res; if(m_pResList) { for(x=0; xGetCount(); x++) { m_pResList->GetText(x, res); m_ResultsList.AddString(res); } } return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }