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.

120 lines
4.0 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : DlgSMTPConfig.h //
  3. // //
  4. // DESCRIPTION : Header file for the CBosSmtpConfigDlg class. //
  5. // The class implement the dialog for new Group. //
  6. // //
  7. // AUTHOR : yossg //
  8. // //
  9. // HISTORY : //
  10. // Jul 20 2000 yossg Create //
  11. // //
  12. // Copyright (C) 2000 Microsoft Corporation All Rights Reserved //
  13. /////////////////////////////////////////////////////////////////////////////
  14. #ifndef DLG_BOS_SMTP_CONFIG_H_INCLUDED
  15. #define DLG_BOS_SMTP_CONFIG_H_INCLUDED
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CBosSmtpConfigDlg
  18. class CBosSmtpConfigDlg :
  19. public CDialogImpl<CBosSmtpConfigDlg>
  20. {
  21. public:
  22. CBosSmtpConfigDlg();
  23. ~CBosSmtpConfigDlg();
  24. enum { IDD = IDD_DLG_BOS_SMTP_SET };
  25. BEGIN_MSG_MAP(CBosSmtpConfigDlg)
  26. MESSAGE_HANDLER ( WM_INITDIALOG, OnInitDialog)
  27. COMMAND_ID_HANDLER( IDOK, OnOK)
  28. COMMAND_ID_HANDLER( IDCANCEL, OnCancel)
  29. MESSAGE_HANDLER( WM_CONTEXTMENU, OnHelpRequest)
  30. MESSAGE_HANDLER( WM_HELP, OnHelpRequest)
  31. COMMAND_HANDLER( IDC_SMTP_USERNAME_EDIT, EN_CHANGE, OnTextChanged)
  32. COMMAND_HANDLER( IDC_SMTP_PASSWORD_EDIT, EN_CHANGE, OnPasswordChanged)
  33. COMMAND_HANDLER( IDC_SMTP_ANONIM_RADIO1, BN_CLICKED, OnRadioButtonClicked)
  34. COMMAND_HANDLER( IDC_SMTP_BASIC_RADIO2, BN_CLICKED, OnRadioButtonClicked)
  35. COMMAND_HANDLER( IDC_SMTP_NTLM_RADIO3, BN_CLICKED, OnRadioButtonClicked)
  36. END_MSG_MAP()
  37. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  38. LRESULT OnOK (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  39. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  40. HRESULT InitSmtpDlg(FAX_ENUM_SMTP_AUTH_OPTIONS enumAuthOption, BSTR bstrUserName, BOOL fIsUnderLocalUserAccount);
  41. LRESULT OnPasswordChanged(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  42. LRESULT OnTextChanged (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  43. LRESULT OnRadioButtonClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  44. //
  45. // Help
  46. //
  47. LRESULT OnHelpRequest (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  48. inline const CComBSTR& GetUserName() { return m_bstrUserName; }
  49. inline CComBSTR& GetPassword()
  50. {
  51. return m_bstrPassword;
  52. }
  53. inline FAX_ENUM_SMTP_AUTH_OPTIONS GetAuthenticationOption()
  54. {
  55. return m_enumAuthOption;
  56. }
  57. inline BOOL IsPasswordModified()
  58. {
  59. return m_fIsPasswordDirty;
  60. }
  61. private:
  62. //
  63. // Methods
  64. //
  65. VOID EnableOK(BOOL fEnable);
  66. VOID EnableBasicAuthenticationControls(BOOL state);
  67. BOOL IsValidData(
  68. BSTR bstrUserName,
  69. BSTR bstrPassword,
  70. /*[OUT]*/int *pCtrlFocus);
  71. //
  72. // Controls
  73. //
  74. CEdit m_UserNameBox;
  75. CEdit m_PasswordBox;
  76. //
  77. // members for data
  78. //
  79. BOOL m_fIsPasswordDirty;
  80. CComBSTR m_bstrUserName;
  81. CComBSTR m_bstrPassword;
  82. BOOL m_fIsUnderLocalUserAccount;
  83. FAX_ENUM_SMTP_AUTH_OPTIONS m_enumAuthOption;
  84. //
  85. // Dialog initialization state
  86. //
  87. BOOL m_fIsDialogInitiated;
  88. };
  89. #endif // DLG_BOS_SMTP_CONFIG_H_INCLUDED