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.

104 lines
3.6 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // FILE : DlgSMTPConfig.h //
  3. // //
  4. // DESCRIPTION : Header file for the CDlgSMTPConfig 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_SMTP_CONFIG_H_INCLUDED
  15. #define DLG_SMTP_CONFIG_H_INCLUDED
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CDlgSMTPConfig
  18. class CDlgSMTPConfig :
  19. public CDialogImpl<CDlgSMTPConfig>
  20. {
  21. public:
  22. CDlgSMTPConfig();
  23. ~CDlgSMTPConfig();
  24. enum { IDD = IDD_DLG_SMTP_SET };
  25. BEGIN_MSG_MAP(CDlgSMTPConfig)
  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_ANONIM_RADIO1, BN_CLICKED, OnRadioButtonClicked)
  32. COMMAND_HANDLER( IDC_SMTP_BASIC_RADIO2, BN_CLICKED, OnRadioButtonClicked)
  33. COMMAND_HANDLER( IDC_SMTP_NTLM_RADIO3, BN_CLICKED, OnRadioButtonClicked)
  34. COMMAND_HANDLER( IDC_SMTP_CREDENTIALS_BASIC_BUTTON, BN_CLICKED, OnCredentialsButtonClicked)
  35. COMMAND_HANDLER( IDC_SMTP_CREDENTIALS_NTLM_BUTTON, BN_CLICKED, OnCredentialsButtonClicked)
  36. END_MSG_MAP()
  37. LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  38. LRESULT OnRadioButtonClicked (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  39. LRESULT OnCredentialsButtonClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  40. LRESULT OnOK (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  41. LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
  42. HRESULT InitSmtpDlg(FAX_ENUM_SMTP_AUTH_OPTIONS enumAuthOption, BSTR bstrUserName);
  43. //
  44. // Help
  45. //
  46. LRESULT OnHelpRequest (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
  47. inline const CComBSTR& GetUserName() { return m_bstrUserName; }
  48. inline CComBSTR& GetPassword()
  49. {
  50. return m_bstrPassword;
  51. }
  52. inline FAX_ENUM_SMTP_AUTH_OPTIONS GetAuthenticationOption()
  53. {
  54. return m_enumAuthOption;
  55. }
  56. inline BOOL IsPasswordModified()
  57. {
  58. return m_fIsPasswordDirty;
  59. }
  60. private:
  61. //
  62. // Methods
  63. //
  64. VOID EnableOK(BOOL fEnable);
  65. VOID EnableCredentialsButton(DWORD iIDC);
  66. //
  67. // members for data
  68. //
  69. BOOL m_fIsPasswordDirty;
  70. CComBSTR m_bstrUserName;
  71. CComBSTR m_bstrPassword;
  72. FAX_ENUM_SMTP_AUTH_OPTIONS m_enumAuthOption;
  73. //
  74. // Dialog initialization state
  75. //
  76. BOOL m_fIsDialogInitiated;
  77. };
  78. #endif // DLG_SMTP_CONFIG_H_INCLUDED