72 lines
1.5 KiB
C++
72 lines
1.5 KiB
C++
// DLG_SmsDY_Add.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "corpsms.h"
|
|
#include "DLG_SmsDY_Add.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// DLG_SmsDY_Add dialog
|
|
|
|
|
|
DLG_SmsDY_Add::DLG_SmsDY_Add(CWnd* pParent /*=NULL*/)
|
|
: CDialog(DLG_SmsDY_Add::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(DLG_SmsDY_Add)
|
|
m_strMsg = _T("");
|
|
//}}AFX_DATA_INIT
|
|
}
|
|
|
|
|
|
void DLG_SmsDY_Add::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(DLG_SmsDY_Add)
|
|
DDX_Text(pDX, IDC_SMSDYADD_MSG, m_strMsg);
|
|
DDV_MaxChars(pDX, m_strMsg, 1000);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(DLG_SmsDY_Add, CDialog)
|
|
//{{AFX_MSG_MAP(DLG_SmsDY_Add)
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// DLG_SmsDY_Add message handlers
|
|
|
|
void DLG_SmsDY_Add::OnOK()
|
|
{
|
|
UpdateData(true);
|
|
if ( m_strMsg.GetLength() <= 0 )
|
|
{
|
|
MessageBox( _T("输入的短语内容不能为空,请输入!"),_T("输入有误"),MB_ICONWARNING );
|
|
return ;
|
|
}
|
|
m_strMsg2 = m_strMsg;
|
|
CDialog::OnOK();
|
|
}
|
|
|
|
BOOL DLG_SmsDY_Add::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
m_strMsg = m_strMsg2;
|
|
UpdateData(false);
|
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|
|
|
|
void DLG_SmsDY_Add::SetParam(CString strMsg)
|
|
{
|
|
m_strMsg2 = strMsg;
|
|
}
|