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.

224 lines
5.6 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1999 **/
  4. /**********************************************************************/
  5. /*
  6. ScopePP.
  7. This file contains all of the prototypes for the
  8. scope property page.
  9. FILE HISTORY:
  10. */
  11. #if !defined(AFX_SCOPEPP_H__A1A51388_AAB3_11D0_AB8B_00C04FC3357A__INCLUDED_)
  12. #define AFX_SCOPEPP_H__A1A51388_AAB3_11D0_AB8B_00C04FC3357A__INCLUDED_
  13. #if !defined _DNSPROP_H
  14. #include "dnsprop.h"
  15. #endif
  16. #if _MSC_VER >= 1000
  17. #pragma once
  18. #endif // _MSC_VER >= 1000
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CScopePropGeneral dialog
  21. class CScopePropGeneral : public CPropertyPageBase
  22. {
  23. DECLARE_DYNCREATE(CScopePropGeneral)
  24. // Construction
  25. public:
  26. CScopePropGeneral();
  27. ~CScopePropGeneral();
  28. // Dialog Data
  29. //{{AFX_DATA(CScopePropGeneral)
  30. enum { IDD = IDP_SCOPE_GENERAL };
  31. CEdit m_editName;
  32. CEdit m_editComment;
  33. CEdit m_editSubnetMaskLength;
  34. CButton m_radioUnlimited;
  35. CButton m_radioLimited;
  36. CEdit m_editMinutes;
  37. CEdit m_editHours;
  38. CEdit m_editDays;
  39. CSpinButtonCtrl m_spinSubnetMaskLength;
  40. CSpinButtonCtrl m_spinHours;
  41. CSpinButtonCtrl m_spinMinutes;
  42. CSpinButtonCtrl m_spinDays;
  43. CString m_strComment;
  44. CString m_strName;
  45. //}}AFX_DATA
  46. CWndIpAddress m_ipaStart; // Start Address
  47. CWndIpAddress m_ipaEnd; // End Address
  48. CWndIpAddress m_ipaSubnetMask; // Subnet Mask
  49. DWORD m_dwStartAddress;
  50. DWORD m_dwEndAddress;
  51. DWORD m_dwSubnetMask;
  52. DWORD m_dwLeaseTime;
  53. BOOL m_bInitialized;
  54. BOOL m_bUpdateName;
  55. BOOL m_bUpdateComment;
  56. BOOL m_bUpdateLease;
  57. BOOL m_bUpdateRange;
  58. UINT m_uImage;
  59. // Context Help Support
  60. virtual DWORD * GetHelpMap() { return DhcpGetHelpMap(CScopePropGeneral::IDD); }
  61. void ValidateLeaseTime();
  62. // Overrides
  63. // ClassWizard generate virtual function overrides
  64. //{{AFX_VIRTUAL(CScopePropGeneral)
  65. public:
  66. virtual BOOL OnApply();
  67. virtual BOOL OnSetActive();
  68. protected:
  69. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  70. //}}AFX_VIRTUAL
  71. virtual BOOL OnPropertyChange(BOOL bScope, LONG_PTR *ChangeMask);
  72. // Implementation
  73. protected:
  74. // Generated message map functions
  75. //{{AFX_MSG(CScopePropGeneral)
  76. virtual BOOL OnInitDialog();
  77. afx_msg void OnRadioLeaseLimited();
  78. afx_msg void OnRadioLeaseUnlimited();
  79. afx_msg void OnChangeEditLeaseDays();
  80. afx_msg void OnChangeEditLeaseHours();
  81. afx_msg void OnChangeEditLeaseMinutes();
  82. afx_msg void OnChangeEditSubnetMaskLength();
  83. afx_msg void OnKillfocusSubnetMask();
  84. afx_msg void OnChangeEditScopeComment();
  85. afx_msg void OnChangeEditScopeName();
  86. //}}AFX_MSG
  87. afx_msg void OnChangeIpAddrStart();
  88. afx_msg void OnChangeIpAddrEnd();
  89. DECLARE_MESSAGE_MAP()
  90. void ActivateDuration(BOOL fActive);
  91. void UpdateMask(BOOL bUseLength);
  92. public:
  93. };
  94. /////////////////////////////////////////////////////////////////////////////
  95. // CScopePropAdvanced dialog
  96. class CScopePropAdvanced : public CPropertyPageBase
  97. {
  98. DECLARE_DYNCREATE(CScopePropAdvanced)
  99. // Construction
  100. public:
  101. CScopePropAdvanced();
  102. ~CScopePropAdvanced();
  103. // Dialog Data
  104. //{{AFX_DATA(CScopePropAdvanced)
  105. enum { IDD = IDP_SCOPE_ADVANCED };
  106. CButton m_staticDuration;
  107. CSpinButtonCtrl m_spinMinutes;
  108. CSpinButtonCtrl m_spinHours;
  109. CSpinButtonCtrl m_spinDays;
  110. CEdit m_editMinutes;
  111. CEdit m_editHours;
  112. CEdit m_editDays;
  113. int m_nRangeType;
  114. //}}AFX_DATA
  115. UINT m_RangeType;
  116. DWORD m_dwLeaseTime;
  117. virtual DWORD * GetHelpMap() { return DhcpGetHelpMap(CScopePropAdvanced::IDD); }
  118. // Overrides
  119. // ClassWizard generate virtual function overrides
  120. //{{AFX_VIRTUAL(CScopePropAdvanced)
  121. public:
  122. virtual BOOL OnApply();
  123. protected:
  124. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  125. //}}AFX_VIRTUAL
  126. virtual BOOL OnPropertyChange(BOOL bScope, LONG_PTR *ChangeMask);
  127. UINT GetRangeType();
  128. // Implementation
  129. protected:
  130. // Generated message map functions
  131. //{{AFX_MSG(CScopePropAdvanced)
  132. afx_msg void OnRadioLeaseLimited();
  133. afx_msg void OnRadioLeaseUnlimited();
  134. afx_msg void OnChangeEditLeaseDays();
  135. afx_msg void OnChangeEditLeaseHours();
  136. afx_msg void OnChangeEditLeaseMinutes();
  137. afx_msg void OnRadioBootpOnly();
  138. afx_msg void OnRadioDhcpBootp();
  139. afx_msg void OnRadioDhcpOnly();
  140. virtual BOOL OnInitDialog();
  141. //}}AFX_MSG
  142. DECLARE_MESSAGE_MAP()
  143. void ActivateDuration(BOOL fActive);
  144. void ActivateLeaseSelection(BOOL fActive);
  145. void ValidateLeaseTime();
  146. };
  147. //{{AFX_INSERT_LOCATION}}
  148. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  149. //}}AFX
  150. class CScopeProperties : public CPropertyPageHolderBase
  151. {
  152. friend class CScopePropGeneral;
  153. public:
  154. CScopeProperties(ITFSNode * pNode,
  155. IComponentData * pComponentData,
  156. ITFSComponentData * pTFSCompData,
  157. LPCTSTR pszSheetName);
  158. virtual ~CScopeProperties();
  159. ITFSComponentData * GetTFSCompData()
  160. {
  161. if (m_spTFSCompData)
  162. m_spTFSCompData->AddRef();
  163. return m_spTFSCompData;
  164. }
  165. void SetVersion(LARGE_INTEGER & liVersion);
  166. void SetDnsRegistration(DWORD dnsRegOption, DHCP_OPTION_SCOPE_TYPE dhcpOptionType);
  167. void SetSupportsDynBootp(BOOL fSupportsDynBootp);
  168. BOOL FSupportsDynBootp() { return m_fSupportsDynBootp; }
  169. public:
  170. CScopePropGeneral m_pageGeneral;
  171. CScopePropAdvanced m_pageAdvanced;
  172. CDnsPropRegistration m_pageDns;
  173. protected:
  174. SPITFSComponentData m_spTFSCompData;
  175. LARGE_INTEGER m_liVersion;
  176. BOOL m_fSupportsDynBootp;
  177. };
  178. #endif // !defined(AFX_SCOPEPP_H__A1A51388_AAB3_11D0_AB8B_00C04FC3357A__INCLUDED_)