?? changepwddlg.cpp.bak
字號:
// ChangePwdDLG.cpp : implementation file
//
#include "stdafx.h"
#include "hotel_mis.h"
#include "ChangePwdDLG.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CChangePwdDLG dialog
CChangePwdDLG::CChangePwdDLG(CWnd* pParent /*=NULL*/)
: CDialog(CChangePwdDLG::IDD, pParent)
{
//{{AFX_DATA_INIT(CChangePwdDLG)
m_sPWD1 = _T("");
m_sPWD2 = _T("");
//}}AFX_DATA_INIT
}
void CChangePwdDLG::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CChangePwdDLG)
DDX_Text(pDX, IDD_CHANGEPWD_PWD1, m_sPWD1);
DDX_Text(pDX, IDD_CHANGEPWD_PWD2, m_sPWD2);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CChangePwdDLG, CDialog)
//{{AFX_MSG_MAP(CChangePwdDLG)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChangePwdDLG message handlers
BOOL CChangePwdDLG::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
((CEdit*)GetDlgItem(IDD_CHANGEPWD_PWD1))->SetLimitText(10);
((CEdit*)GetDlgItem(IDD_CHANGEPWD_PWD2))->SetLimitText(10);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CChangePwdDLG::OnOK()
{
// TODO: Add extra validation here
// Make sure pwd1 is not null
UpdateData(true);
if ( ""==m_sPWD1 )
{
AfxMessageBox(_T("密碼不能未空"), MB_ICONEXCLAMATION);
return;
}
// Judge whether pwd1==pwd2
if ( 0!=m_sPWD1.Compare(m_sPWD2) )
{
AfxMessageBox(_T("兩次輸入密碼不一樣,請確認(rèn)"), MB_ICONEXCLAMATION);
return;
}
CDialog::OnOK();
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -