InputAuthDlg.cpp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // InputAuthDlg.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "DBServer.h"
  5. #include "InputAuthDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // InputAuthDlg dialog
  13. InputAuthDlg::InputAuthDlg(CWnd* pParent /*=NULL*/)
  14. : CDialog(InputAuthDlg::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(InputAuthDlg)
  17. // NOTE: the ClassWizard will add member initialization here
  18. //}}AFX_DATA_INIT
  19. }
  20. void InputAuthDlg::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(InputAuthDlg)
  24. // NOTE: the ClassWizard will add DDX and DDV calls here
  25. //}}AFX_DATA_MAP
  26. }
  27. BEGIN_MESSAGE_MAP(InputAuthDlg, CDialog)
  28. //{{AFX_MSG_MAP(InputAuthDlg)
  29. ON_EN_CHANGE(IDC_EDIT2, OnChangeEdit2)
  30. ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1)
  31. //}}AFX_MSG_MAP
  32. END_MESSAGE_MAP()
  33. /////////////////////////////////////////////////////////////////////////////
  34. // InputAuthDlg message handlers
  35. BOOL InputAuthDlg::OnInitDialog()
  36. {
  37. CDialog::OnInitDialog();
  38. return TRUE; // return TRUE unless you set the focus to a control
  39. // EXCEPTION: OCX Property Pages should return FALSE
  40. }
  41. void InputAuthDlg::OnOK()
  42. {
  43. CDialog::OnOK();
  44. }
  45. void InputAuthDlg::OnChangeEdit2()
  46. {
  47. // TODO: If this is a RICHEDIT control, the control will not
  48. // send this notification unless you override the CDialog::OnInitDialog()
  49. // function and call CRichEditCtrl().SetEventMask()
  50. // with the ENM_CHANGE flag ORed into the mask.
  51. CString authcode;
  52. GetDlgItemText(IDC_EDIT2, authcode);
  53. authcode.TrimLeft ();
  54. authcode.TrimRight ();
  55. authcode.Replace ("\n", "");
  56. authcode.Replace ("\r", "");
  57. SetDlgItemText(IDC_EDIT2, authcode);
  58. // TODO: Add your control notification handler code here
  59. }
  60. void InputAuthDlg::OnChangeEdit1()
  61. {
  62. // TODO: If this is a RICHEDIT control, the control will not
  63. // send this notification unless you override the CDialog::OnInitDialog()
  64. // function and call CRichEditCtrl().SetEventMask()
  65. // with the ENM_CHANGE flag ORed into the mask.
  66. CString authcode;
  67. GetDlgItemText(IDC_EDIT1, authcode);
  68. authcode.TrimLeft ();
  69. authcode.TrimRight ();
  70. authcode.Replace ("\n", "");
  71. authcode.Replace ("\r", "");
  72. SetDlgItemText(IDC_EDIT1, authcode);
  73. // TODO: Add your control notification handler code here
  74. }