// DLG_User_Find.cpp : implementation file // #include "stdafx.h" #include "smsmanager.h" #include "DLG_User_Find.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // DLG_User_Find dialog DLG_User_Find::DLG_User_Find(CWnd* pParent /*=NULL*/) : CDialog(DLG_User_Find::IDD, pParent) { //{{AFX_DATA_INIT(DLG_User_Find) m_strName = _T(""); //}}AFX_DATA_INIT } void DLG_User_Find::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(DLG_User_Find) DDX_Text(pDX, IDC_USER_FIND_NAME, m_strName); DDV_MaxChars(pDX, m_strName, 30); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(DLG_User_Find, CDialog) //{{AFX_MSG_MAP(DLG_User_Find) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // DLG_User_Find message handlers void DLG_User_Find::OnOK() { if ( !UpdateData(true) ) return ; if ( m_strName.GetLength() <= 0 ) { MessageBox( _T("请先输入查找内容!"),_T("错误"),MB_ICONWARNING ); return; } CDialog::OnOK(); } BOOL DLG_User_Find::OnInitDialog() { CDialog::OnInitDialog(); // TODO: 在此添加额外的初始化 return TRUE; // return TRUE unless you set the focus to a control // 异常: OCX 属性页应返回 FALSE }