{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetPwd)
DDX_Text(pDX, IDC_SETPWD, m_Pwd);
DDX_Text(pDX, IDC_SUREPWD, m_SurePwd);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSetPwd, CDialog)
//{{AFX_MSG_MAP(CSetPwd)
ON_BN_CLICKED(IDC_OK, OnOk)
ON_BN_CLICKED(IDC_CANCEL, OnCancel)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/
// CSetPwd message handlers
BOOL CSetPwd::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CWnd* pWnd=GetDlgItem(IDC_SETPWD);
pWnd->SetFocus();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CSetPwd::OnOk()
{
// TODO: Add your control notification handler code here
char * m_Passwd;
UpdateData(TRUE);
m_Passwd=m_Pwd.GetBuffer(50);
m_Pwd.ReleaseBuffer();
if((strcmp(m_Pwd,m_SurePwd))!=0)
{
MessageBox("设置不对,请重新输入");
CWnd* pWnd1=GetDlgItem(IDC_SETPWD);
pWnd1->SetWindowText("");
pWnd1->SetFocus();
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetPwd)
DDX_Text(pDX, IDC_SETPWD, m_Pwd);
DDX_Text(pDX, IDC_SUREPWD, m_SurePwd);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSetPwd, CDialog)
//{{AFX_MSG_MAP(CSetPwd)
ON_BN_CLICKED(IDC_OK, OnOk)
ON_BN_CLICKED(IDC_CANCEL, OnCancel)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/
// CSetPwd message handlers
BOOL CSetPwd::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CWnd* pWnd=GetDlgItem(IDC_SETPWD);
pWnd->SetFocus();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CSetPwd::OnOk()
{
// TODO: Add your control notification handler code here
char * m_Passwd;
UpdateData(TRUE);
m_Passwd=m_Pwd.GetBuffer(50);
m_Pwd.ReleaseBuffer();
if((strcmp(m_Pwd,m_SurePwd))!=0)
{
MessageBox("设置不对,请重新输入");
CWnd* pWnd1=GetDlgItem(IDC_SETPWD);
pWnd1->SetWindowText("");
pWnd1->SetFocus();