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.

60 lines
2.2 KiB

  1. #ifndef __SERVERGENERALPAGE_H
  2. #define __SERVERGENERALPAGE_H
  3. #include <P3Admin.h>
  4. #include <tmplEdit.h>
  5. #define RESTART_POP3SVC 0x1
  6. #define RESTART_SMTP 0x2
  7. class CServerNode;
  8. class CServerGeneralPage : public CPropertyPageImpl<CServerGeneralPage>
  9. {
  10. public:
  11. typedef CPropertyPageImpl<CServerGeneralPage> BC;
  12. CServerGeneralPage::CServerGeneralPage(IP3Config* pServer, LONG_PTR lNotifyHandle, CServerNode* pParent) :
  13. m_spServerConfig(pServer), m_lNotifyHandle(lNotifyHandle), m_pParent(pParent) {};
  14. enum { IDD = IDD_SERVER_GENERAL_PAGE };
  15. BEGIN_MSG_MAP( CServerGeneralPage )
  16. CHAIN_MSG_MAP(CPropertyPageImpl<CServerGeneralPage>)
  17. MESSAGE_HANDLER ( WM_INITDIALOG, OnInitDialog )
  18. MESSAGE_HANDLER ( WM_HELP, OnHelpMsg )
  19. COMMAND_HANDLER ( IDC_BROWSE, BN_CLICKED, OnBrowse )
  20. COMMAND_HANDLER ( IDC_SERVER_CREATEUSER, BN_CLICKED, OnChange )
  21. COMMAND_HANDLER ( IDC_AUTHENTICATION, CBN_SELCHANGE, OnChange )
  22. COMMAND_HANDLER ( IDC_LOGGING, CBN_SELCHANGE, OnChange )
  23. COMMAND_HANDLER ( IDC_PORT, EN_CHANGE, OnChange )
  24. COMMAND_HANDLER ( IDC_DIRECTORY, EN_CHANGE, OnChange )
  25. COMMAND_HANDLER ( IDC_SERVER_SPA_REQ, BN_CLICKED, OnChange )
  26. END_MSG_MAP()
  27. // message handlers
  28. LRESULT OnInitDialog ( UINT mMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
  29. LRESULT OnHelpMsg ( UINT mMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled );
  30. LRESULT OnBrowse ( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
  31. LRESULT OnChange ( WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled );
  32. // Over-ridden function
  33. BOOL OnApply();
  34. void OnFinalMessage(HWND);
  35. // Helper function
  36. BOOL ValidateControls();
  37. private:
  38. CComPtr<IP3Config> m_spServerConfig;
  39. LONG_PTR m_lNotifyHandle;
  40. CServerNode* m_pParent;
  41. CWindowImplNoImm<> m_wndPort;
  42. DWORD m_dwSvcRestart;
  43. };
  44. #endif //__SERVERGENERALPAGE_H