Source code of Windows XP (NT5)
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.

63 lines
1.5 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. //}}AFX_DATA_MAP
  37. }
  38. BEGIN_MESSAGE_MAP(CConfirmPassDlg, CDialog)
  39. //{{AFX_MSG_MAP(CConfirmPassDlg)
  40. //}}AFX_MSG_MAP
  41. END_MESSAGE_MAP()
  42. /////////////////////////////////////////////////////////////////////////////
  43. // CConfirmPassDlg message handlers
  44. void CConfirmPassDlg::OnOK()
  45. {
  46. UpdateData( TRUE );
  47. // confirm it
  48. if ( m_sz_password_new != m_szOrigPass )
  49. {
  50. AfxMessageBox( IDS_PASS_CONFIRM_FAIL );
  51. return;
  52. }
  53. CDialog::OnOK();
  54. }