hangePwForm.cpp
资源名称:00011511.rar [点击查看]
上传用户:xiuanze55
上传日期:2017-08-03
资源大小:1080k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- //Change Password dialog. (C) 2003 PSMKorea
- // hangePwForm.cpp : implementation file
- //
- #include "stdafx.h"
- #include "PSMScrLk.h"
- #include "hangePwForm.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // ChangePwForm dialog
- ChangePwForm::ChangePwForm(CWnd* pParent /*=NULL*/)
- : CDialog(ChangePwForm::IDD, pParent)
- {
- //{{AFX_DATA_INIT(ChangePwForm)
- m_vOldPW = _T("");
- m_vNewPW2 = _T("");
- m_vNewPW1 = _T("");
- //}}AFX_DATA_INIT
- }
- void ChangePwForm::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(ChangePwForm)
- DDX_Control(pDX, IDC_EDIT_OLD_PW, m_cOldPW);
- DDX_Control(pDX, IDC_EDIT_NEW_PW2, m_cNewPW2);
- DDX_Control(pDX, IDC_EDIT_NEW_PW1, m_cNewPW1);
- DDX_Text(pDX, IDC_EDIT_OLD_PW, m_vOldPW);
- DDV_MaxChars(pDX, m_vOldPW, 20);
- DDX_Text(pDX, IDC_EDIT_NEW_PW2, m_vNewPW2);
- DDV_MaxChars(pDX, m_vNewPW2, 20);
- DDX_Text(pDX, IDC_EDIT_NEW_PW1, m_vNewPW1);
- DDV_MaxChars(pDX, m_vNewPW1, 20);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(ChangePwForm, CDialog)
- //{{AFX_MSG_MAP(ChangePwForm)
- ON_WM_SHOWWINDOW()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // ChangePwForm message handlers
- void ChangePwForm::OnCancel()
- {
- // TODO: Add extra cleanup here
- bOK=FALSE;
- CDialog::OnCancel();
- }
- void ChangePwForm::OnOK()
- {
- // TODO: Add extra validation here
- bOK=TRUE;
- UpdateData(TRUE);
- CDialog::OnOK();
- }
- void ChangePwForm::OnShowWindow(BOOL bShow, UINT nStatus)
- {
- CDialog::OnShowWindow(bShow, nStatus);
- if (iFocusPos==0) {
- m_cOldPW.SetFocus();
- }else if (iFocusPos==1) {
- m_cNewPW1.SetFocus();
- }else if (iFocusPos==2) {
- m_cNewPW2.SetFocus();
- }
- }