Source code of Windows XP (NT5)
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.

100 lines
2.5 KiB

  1. /*++
  2. Copyright(c) 1998,99 Microsoft Corporation
  3. Module Name:
  4. host.h
  5. Abstract:
  6. Windows Load Balancing Service (WLBS)
  7. Notifier object UI - host config tab
  8. Author:
  9. kyrilf
  10. shouse
  11. --*/
  12. #pragma once
  13. #include <ncxbase.h>
  14. #include <ncatlps.h>
  15. #include "resource.h"
  16. #include "wlbsparm.h"
  17. #include "wlbscfg.h"
  18. /* Limitations for IP address fields. */
  19. #define WLBS_FIELD_EMPTY -1
  20. #define WLBS_FIELD_LOW 0
  21. #define WLBS_FIELD_HIGH 255
  22. #define WLBS_IP_FIELD_ZERO_LOW 1
  23. #define WLBS_IP_FIELD_ZERO_HIGH 223
  24. #define WLBS_BLANK_HPRI -1
  25. class CDialogHost : public CPropSheetPage {
  26. public:
  27. /* Declare the message map. */
  28. BEGIN_MSG_MAP (CDialogHost)
  29. MESSAGE_HANDLER (WM_INITDIALOG, OnInitDialog)
  30. MESSAGE_HANDLER (WM_CONTEXTMENU, OnContextMenu)
  31. MESSAGE_HANDLER (WM_HELP, OnHelp)
  32. NOTIFY_CODE_HANDLER (PSN_APPLY, OnApply)
  33. NOTIFY_CODE_HANDLER (PSN_KILLACTIVE, OnKillActive)
  34. NOTIFY_CODE_HANDLER (PSN_SETACTIVE, OnActive)
  35. NOTIFY_CODE_HANDLER (PSN_RESET, OnCancel)
  36. NOTIFY_CODE_HANDLER (IPN_FIELDCHANGED, OnIpFieldChange)
  37. COMMAND_ID_HANDLER (IDC_EDIT_DED_MASK, OnEditDedMask)
  38. END_MSG_MAP ()
  39. /* Constructors/Destructors. */
  40. CDialogHost (NETCFG_WLBS_CONFIG * paramp, const DWORD * phelpIDs = NULL);
  41. ~CDialogHost ();
  42. public:
  43. /* Message map functions. */
  44. LRESULT OnInitDialog (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & fHandled);
  45. LRESULT OnContextMenu (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & fHandled);
  46. LRESULT OnHelp (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL & fHandled);
  47. LRESULT OnApply (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  48. LRESULT OnKillActive (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  49. LRESULT OnActive (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  50. LRESULT OnCancel (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  51. LRESULT OnIpFieldChange (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  52. LRESULT OnEditDedMask (WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL & fHandled);
  53. LRESULT OnFieldChange (int idCtrl, LPNMHDR pnmh, BOOL & fHandled);
  54. friend class CDialogCluster;
  55. friend class CDialogPorts;
  56. private:
  57. void PrintRangeError (unsigned int ids, int low, int high);
  58. void PrintIPRangeError (unsigned int ids, int value, int low, int high);
  59. void SetInfo ();
  60. void UpdateInfo ();
  61. BOOL ValidateInfo ();
  62. NETCFG_WLBS_CONFIG * m_paramp;
  63. const DWORD * m_adwHelpIDs;
  64. struct {
  65. UINT IpControl;
  66. int Field;
  67. int Value;
  68. UINT RejectTimes;
  69. } m_IPFieldChangeState;
  70. };