// DLG_C_NoSendTime_Modify.cpp : implementation file // #include "stdafx.h" #include "smsmanager.h" #include "DLG_C_NoSendTime_Modify.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // DLG_C_NoSendTime_Modify dialog DLG_C_NoSendTime_Modify::DLG_C_NoSendTime_Modify(CWnd* pParent /*=NULL*/) : CDialog(DLG_C_NoSendTime_Modify::IDD, pParent) { //{{AFX_DATA_INIT(DLG_C_NoSendTime_Modify) m_strBZ = _T(""); m_tBegin = COleDateTime::GetCurrentTime(); m_tEnd = COleDateTime::GetCurrentTime(); m_bStatus = FALSE; //}}AFX_DATA_INIT memset( &m_NSTData , 0 , sizeof(m_NSTData)); } void DLG_C_NoSendTime_Modify::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(DLG_C_NoSendTime_Modify) DDX_Text(pDX, IDC_NOSENDTIMESET_MODIFY__BZ, m_strBZ); DDV_MaxChars(pDX, m_strBZ, 200); DDX_DateTimeCtrl(pDX, IDC_NOSENDTIMESET_MODIFY_BEGIN, m_tBegin); DDX_DateTimeCtrl(pDX, IDC_NOSENDTIMESET_MODIFY_END, m_tEnd); DDX_Check(pDX, IDC_NOSENDTIMESET_MODIFY_STATUS, m_bStatus); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(DLG_C_NoSendTime_Modify, CDialog) //{{AFX_MSG_MAP(DLG_C_NoSendTime_Modify) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // DLG_C_NoSendTime_Modify message handlers BOOL DLG_C_NoSendTime_Modify::OnInitDialog() { CDialog::OnInitDialog(); m_bStatus = m_NSTData.lStatus; m_strBZ = m_NSTData.szBZ; COleDateTime tBegin(m_NSTData.tBegin); COleDateTime tEnd(m_NSTData.tEnd); if ( tBegin.GetStatus() == COleDateTime::valid ) { m_tBegin = tBegin; } if ( tEnd.GetStatus() == COleDateTime::valid ) { m_tEnd = tEnd; } UpdateData(false); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void DLG_C_NoSendTime_Modify::OnOK() { if ( !UpdateData(true) ) return ; m_tBegin.GetAsSystemTime( m_NSTData.tBegin ); m_tEnd.GetAsSystemTime( m_NSTData.tEnd ); m_NSTData.lStatus = m_bStatus; _tcscpy( m_NSTData.szBZ , m_strBZ); CDialog::OnOK(); } void DLG_C_NoSendTime_Modify::SetParam(ANS_GetNoSendTimeData tddata) { m_NSTData = tddata; } ANS_GetNoSendTimeData DLG_C_NoSendTime_Modify::GetParam() { return m_NSTData; }