// DLG_AddWarning.cpp : implementation file // #include "stdafx.h" #include "corpsms.h" #include "DLG_AddWarning.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // DLG_AddWarning dialog DLG_AddWarning::DLG_AddWarning(const TCHAR * pTitle,CWnd* pParent /*=NULL*/) : CDialog(DLG_AddWarning::IDD, pParent) { //{{AFX_DATA_INIT(DLG_AddWarning) m_bNext = FALSE; //}}AFX_DATA_INIT m_strTitle = pTitle; } void DLG_AddWarning::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(DLG_AddWarning) DDX_Check(pDX, IDC_ADDWARNING_NEXT, m_bNext); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(DLG_AddWarning, CDialog) //{{AFX_MSG_MAP(DLG_AddWarning) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // DLG_AddWarning message handlers BOOL DLG_AddWarning::OnInitDialog() { CDialog::OnInitDialog(); CButton * pButton = (CButton*)GetDlgItem(IDC_ADDWARNING_SKIP); pButton->SetCheck(true); CString str; this->GetWindowText(str); str = str+ _T(" ["+m_strTitle+"]"); this->SetWindowText(str); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void DLG_AddWarning::OnOK() { if (!UpdateData(true)) return ; m_bShowReMobile = !m_bNext; CButton * pButton = (CButton*)GetDlgItem(IDC_ADDWARNING_SKIP); if ( pButton->GetCheck() ) m_lReMobileType = 0; else m_lReMobileType = 1; CDialog::OnOK(); }