// SmsSend.cpp : 实现文件 // #include "stdafx.h" #include "FXSend.h" #include "SmsSend.h" #include "afxdialogex.h" // CSmsSend 对话框 IMPLEMENT_DYNAMIC(CSmsSend, CDialogEx) CSmsSend::CSmsSend(CWnd* pParent /*=NULL*/) : CDialogEx(CSmsSend::IDD, pParent) { m_strMobile = _T(""); m_strMsg = _T(""); m_strSubNum = _T(""); } CSmsSend::~CSmsSend() { } void CSmsSend::DoDataExchange(CDataExchange* pDX) { CDialogEx::DoDataExchange(pDX); DDX_Text(pDX, IDC_SMSSEND_MOBILE, m_strMobile); DDV_MaxChars(pDX, m_strMobile, 200); DDX_Text(pDX, IDC_SMSSEND_MSG, m_strMsg); DDV_MaxChars(pDX, m_strMsg, 1000); DDX_Text(pDX, IDC_SMSSEND_SUBNUM, m_strSubNum); DDV_MaxChars(pDX, m_strSubNum, 10); } BEGIN_MESSAGE_MAP(CSmsSend, CDialogEx) ON_BN_CLICKED(IDOK, &CSmsSend::OnBnClickedOk) END_MESSAGE_MAP() // CSmsSend 消息处理程序 BOOL CSmsSend::OnInitDialog() { CDialogEx::OnInitDialog(); m_strMobile=_T("13922455188"); m_strMsg=_T("【广州首易】本次操作验证码是:723623,5分钟有效,如非本人操作请忽略。"); UpdateData(false); return TRUE; // return TRUE unless you set the focus to a control // 异常: OCX 属性页应返回 FALSE } void CSmsSend::OnBnClickedOk() { if ( !UpdateData(true) ) return ; CDialogEx::OnOK(); }