Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.7 KiB

  1. // CnfrmPsD.cpp : implementation file
  2. //
  3. // NOTE that file Passdlg.h/cpp is very similar to this
  4. // file!
  5. //
  6. // CnfrmPsD class has an OnOK that will complain
  7. // to the user if the passwds dont match
  8. // This is above whats in PassDlg class
  9. //
  10. // And class PassDlg has an OnInitDialog that Cnfrmpsd
  11. // does not have. This simply puts focus on the edit
  12. // field for the passwd
  13. //
  14. #include "stdafx.h"
  15. #include "certmap.h"
  16. #include "CnfrmPsD.h"
  17. #ifdef _DEBUG
  18. #define new DEBUG_NEW
  19. #undef THIS_FILE
  20. static char THIS_FILE[] = __FILE__;
  21. #endif
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CConfirmPassDlg dialog
  24. CConfirmPassDlg::CConfirmPassDlg(CWnd* pParent /*=NULL*/)
  25. : CDialog(CConfirmPassDlg::IDD, pParent)
  26. {
  27. //{{AFX_DATA_INIT(CConfirmPassDlg)
  28. m_sz_password_new = _T("");
  29. //}}AFX_DATA_INIT
  30. }
  31. void CConfirmPassDlg::DoDataExchange(CDataExchange* pDX)
  32. {
  33. CDialog::DoDataExchange(pDX);
  34. //{{AFX_DATA_MAP(CConfirmPassDlg)
  35. //DDX_Text(pDX, IDC_CONFIRM_PASSWORD, m_sz_password_new);
  36. DDX_Text_SecuredString(pDX, IDC_CONFIRM_PASSWORD, m_sz_password_new);
  37. //}}AFX_DATA_MAP
  38. }
  39. BEGIN_MESSAGE_MAP(CConfirmPassDlg, CDialog)
  40. //{{AFX_MSG_MAP(CConfirmPassDlg)
  41. //}}AFX_MSG_MAP
  42. END_MESSAGE_MAP()
  43. /////////////////////////////////////////////////////////////////////////////
  44. // CConfirmPassDlg message handlers
  45. void CConfirmPassDlg::OnOK()
  46. {
  47. UpdateData( TRUE );
  48. // confirm it
  49. if ( m_sz_password_new != m_szOrigPass )
  50. {
  51. AfxMessageBox( IDS_PASS_CONFIRM_FAIL );
  52. return;
  53. }
  54. CDialog::OnOK();
  55. }