// LogPage.cpp : implementation file // #include "stdafx.h" #include "CLDMWLSCP.h" #include "LogPage.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // LogPage property page IMPLEMENT_DYNCREATE(CLogPage, CPropertyPage) CLogPage::CLogPage() : CPropertyPage(CLogPage::IDD) { //{{AFX_DATA_INIT(CLogPage) m_sEditStatus = _T(""); //}}AFX_DATA_INIT } CLogPage::~CLogPage() { } void CLogPage::DoDataExchange(CDataExchange* pDX) { CPropertyPage::DoDataExchange(pDX); //{{AFX_DATA_MAP(CLogPage) DDX_Text(pDX, IDC_EDSTATUS, m_sEditStatus); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CLogPage, CPropertyPage) //{{AFX_MSG_MAP(CLogPage) ON_BN_CLICKED(IDC_BUTCLEAR, OnButclear) ON_EN_SETFOCUS(IDC_EDSTATUS, OnSetFocusEdStatus) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // LogPage message handlers BOOL CLogPage::OnSetActive() { m_sEditStatus = ((CPropertySheetDlg*)GetParent())->m_sStatus; UpdateData(FALSE); return CPropertyPage::OnSetActive(); } void CLogPage::OnButclear() { ((CPropertySheetDlg*)GetParent())->m_sStatus = ""; m_sEditStatus = ""; UpdateData(FALSE); } void CLogPage::OnSetFocusEdStatus() { // Remove the selection ::SendMessage(GetDlgItem(IDC_EDSTATUS)->m_hWnd, EM_SETSEL, -1, 0); }