SmsManager/DLG_CliSmsTD_Modify.cpp

77 lines
1.6 KiB
C++
Raw Normal View History

2025-01-14 10:46:18 +08:00
// DLG_CliSmsTD_Modify.cpp : implementation file
//
#include "stdafx.h"
#include "smsmanager.h"
#include "DLG_CliSmsTD_Modify.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// DLG_CliSmsTD_Modify dialog
DLG_CliSmsTD_Modify::DLG_CliSmsTD_Modify(CWnd* pParent /*=NULL*/)
: CDialog(DLG_CliSmsTD_Modify::IDD, pParent)
{
//{{AFX_DATA_INIT(DLG_CliSmsTD_Modify)
m_strName = _T("");
//}}AFX_DATA_INIT
}
void DLG_CliSmsTD_Modify::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(DLG_CliSmsTD_Modify)
DDX_Text(pDX, IDD_CLISMSTD_MODIFY_NAME, m_strName);
DDV_MaxChars(pDX, m_strName, 60);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(DLG_CliSmsTD_Modify, CDialog)
//{{AFX_MSG_MAP(DLG_CliSmsTD_Modify)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// DLG_CliSmsTD_Modify message handlers
BOOL DLG_CliSmsTD_Modify::OnInitDialog()
{
CDialog::OnInitDialog();
m_strName = m_strTDName;
UpdateData(false);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void DLG_CliSmsTD_Modify::SetParam(CString str)
{
m_strTDName = str;
}
void DLG_CliSmsTD_Modify::OnOK()
{
if(!UpdateData(true))
return ;
if ( m_strName.GetLength()<=0 )
{
MessageBox( _T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>") , _T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") , MB_ICONWARNING );
GetDlgItem(IDD_CLISMSTD_MODIFY_NAME)->SetFocus();
return ;
}
m_strTDName = m_strName;
CDialog::OnOK();
}