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.

118 lines
2.7 KiB

  1. #ifndef HOSTPAGE_H
  2. #define HOSTPAGE_H
  3. #include "stdafx.h"
  4. #include "resource.h"
  5. #include "MNLBUIData.h"
  6. #include "IpSubnetMaskControl.h"
  7. class HostPage : public CPropertyPage
  8. {
  9. public:
  10. enum
  11. {
  12. IDD = IDD_HOST_PAGE,
  13. };
  14. HostPage(
  15. CPropertySheet *psh,
  16. NLB_EXTENDED_CLUSTER_CONFIGURATION *pNlbCfg,
  17. ENGINEHANDLE ehCluster OPTIONAL,
  18. const ENGINEHANDLE *pehInterface OPTIONAL
  19. );
  20. // member controls
  21. CComboBox nicName;
  22. CComboBox priority;
  23. //
  24. // IpAddress and subnet mask
  25. //
  26. CIPAddressCtrl ipAddress;
  27. CIPAddressCtrl subnetMask;
  28. CComboBox initialState;
  29. CButton persistSuspend;
  30. // overrides of CPropertyPage
  31. virtual void DoDataExchange( CDataExchange* pDX );
  32. virtual BOOL OnInitDialog();
  33. virtual void OnOK();
  34. virtual BOOL OnSetActive();
  35. virtual BOOL OnKillActive();
  36. afx_msg void OnSelectedNicChanged();
  37. afx_msg void OnGainFocusDedicatedIP();
  38. afx_msg void OnGainFocusDedicatedMask();
  39. afx_msg BOOL OnHelpInfo (HELPINFO* helpInfo );
  40. afx_msg void OnContextMenu( CWnd* pWnd, CPoint point );
  41. virtual BOOL OnWizardFinish( );
  42. private:
  43. CPropertySheet *m_pshOwner;
  44. ULONG m_AvailableHostPriorities;
  45. ENGINEHANDLE m_ehCluster; // engine handle to cluster (could be NULL)
  46. const ENGINEHANDLE *m_pehInterface; // engine handle to inteface (could be NULL)
  47. ClusterData* m_clusterData;
  48. // The (New) place to get/save config.
  49. //
  50. NLB_EXTENDED_CLUSTER_CONFIGURATION *m_pNlbCfg;
  51. BOOL m_fSaved; // If the config has been saved (from ui) at least once.
  52. void
  53. mfn_LoadFromNlbCfg(void);
  54. void
  55. mfn_SaveToNlbCfg(void);
  56. BOOL
  57. mfn_ValidateData();
  58. BOOL
  59. mfn_ValidateDip(LPCWSTR szDip);
  60. DECLARE_MESSAGE_MAP()
  61. };
  62. // help ids for this dialog.
  63. //
  64. static DWORD g_aHelpIDs_IDD_HOST_PAGE [] = {
  65. IDC_GROUP_NIC, IDC_GROUP_NIC,
  66. IDC_NIC_FRIENDLY, IDC_NIC_FRIENDLY,
  67. IDC_TEXT_PRI, IDC_EDIT_PRI,
  68. IDC_EDIT_PRI, IDC_EDIT_PRI,
  69. IDC_GROUP_DED_IP, IDC_GROUP_DED_IP,
  70. IDC_TEXT_DED_IP, IDC_EDIT_DED_IP,
  71. IDC_EDIT_DED_IP, IDC_EDIT_DED_IP,
  72. IDC_TEXT_DED_MASK, IDC_EDIT_DED_MASK,
  73. IDC_EDIT_DED_MASK, IDC_EDIT_DED_MASK,
  74. IDC_GROUP_INITIAL_HOST_STATE, IDC_GROUP_INITIAL_HOST_STATE,
  75. IDC_COMBOBOX_DEFAULT_STATE, IDC_COMBOBOX_DEFAULT_STATE,
  76. IDC_TEXT_DEFAULT_STATE, IDC_COMBOBOX_DEFAULT_STATE,
  77. IDC_CHECK_PERSIST_SUSPEND, IDC_CHECK_PERSIST_SUSPEND,
  78. 0, 0
  79. };
  80. #endif