InputPsw2.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // InputPsw2.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "InputPsw2.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // InputPsw2 dialog
  13. InputPsw2::InputPsw2(CWnd* pParent /*=NULL*/)
  14. : CDialog(InputPsw2::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(InputPsw2)
  17. m_psw = _T("");
  18. m_mode=0;
  19. //}}AFX_DATA_INIT
  20. }
  21. void InputPsw2::DoDataExchange(CDataExchange* pDX)
  22. {
  23. CDialog::DoDataExchange(pDX);
  24. //{{AFX_DATA_MAP(InputPsw2)
  25. DDX_Text(pDX, IDC_EDIT1, m_psw);
  26. //}}AFX_DATA_MAP
  27. }
  28. BEGIN_MESSAGE_MAP(InputPsw2, CDialog)
  29. //{{AFX_MSG_MAP(InputPsw2)
  30. //}}AFX_MSG_MAP
  31. END_MESSAGE_MAP()
  32. /////////////////////////////////////////////////////////////////////////////
  33. // InputPsw2 message handlers
  34. BOOL InputPsw2::OnInitDialog()
  35. {
  36. CDialog::OnInitDialog();
  37. // TODO: Add extra initialization here
  38. if(m_mode)
  39. SetWindowText("ÇëÊäÈë¾ÉÃÜÂë");
  40. GetDlgItem(IDC_EDIT1)->SetFocus();
  41. return 0; // return TRUE unless you set the focus to a control
  42. // EXCEPTION: OCX Property Pages should return FALSE
  43. }
  44. void InputPsw2::OnOK()
  45. {
  46. // TODO: Add extra validation here
  47. UpdateData();
  48. m_psw.TrimLeft ();
  49. m_psw.TrimRight ();
  50. if(m_psw=="")return;
  51. CDialog::OnOK();
  52. }