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.

160 lines
4.0 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. statmapp.h
  7. Property Page for Active Registrations Record
  8. FILE HISTORY:
  9. */
  10. #if !defined _STATMAPP_H
  11. #define _STATMAPP_H
  12. #if _MSC_VER >= 1000
  13. #pragma once
  14. #endif // _MSC_VER >= 1000
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CStaticMappingProp dialog
  17. #ifndef _IPCTRL_H
  18. #include "ipctrl.h"
  19. #endif
  20. #ifndef _ACTREG_H
  21. #include "actreg.h"
  22. #endif
  23. // Static Record Types
  24. extern CString g_strStaticTypeUnique;
  25. extern CString g_strStaticTypeDomainName;
  26. extern CString g_strStaticTypeMultihomed;
  27. extern CString g_strStaticTypeGroup;
  28. extern CString g_strStaticTypeInternetGroup;
  29. extern CString g_strStaticTypeUnknown;
  30. class CStaticMappingProp : public CPropertyPageBase
  31. {
  32. DECLARE_DYNCREATE(CStaticMappingProp)
  33. // Construction
  34. public:
  35. CStaticMappingProp(UINT uIDD = IDD_STATIC_MAPPING_PROPERTIES);
  36. ~CStaticMappingProp();
  37. virtual BOOL OnPropertyChange(BOOL bScope, LONG_PTR *ChangeMask);
  38. // Dialog Data
  39. //{{AFX_DATA(CStaticMappingProp)
  40. enum { IDD = IDD_STATIC_MAPPING_PROPERTIES };
  41. CEdit m_editScopeName;
  42. CListBox m_listIPAdd;
  43. CButton m_buttonRemove;
  44. CButton m_buttonAdd;
  45. CComboBox m_comboIPAdd;
  46. CEdit m_editName;
  47. CComboBox m_comboType;
  48. CString m_strName;
  49. CString m_strType;
  50. CString m_strScopeName;
  51. //}}AFX_DATA
  52. CEdit m_editCustomIPAdd;
  53. CString m_strIPAdd;
  54. LONG m_lIPAddress;
  55. CString m_strOnInitIPAdd;
  56. UINT m_uImage;
  57. UINT m_uIDD;
  58. // Overrides
  59. // ClassWizard generate virtual function overrides
  60. //{{AFX_VIRTUAL(CStaticMappingProp)
  61. public:
  62. virtual void OnOK();
  63. virtual BOOL OnApply();
  64. protected:
  65. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  66. //}}AFX_VIRTUAL
  67. // Implementation
  68. protected:
  69. // Generated message map functions
  70. //{{AFX_MSG(CStaticMappingProp)
  71. virtual BOOL OnInitDialog();
  72. afx_msg void OnButtonAdd();
  73. afx_msg void OnButtonRemove();
  74. afx_msg void OnSelchangeComboType();
  75. afx_msg void OnChangeEditCompname();
  76. afx_msg void OnSelChangeListIpAdd();
  77. //}}AFX_MSG
  78. DECLARE_MESSAGE_MAP()
  79. // single ip address controls
  80. afx_msg void OnChangeIpAddress();
  81. private:
  82. BOOL FillControls();
  83. void AssignMappingType();
  84. void FillDynamicRecData(CString& strType, CString& strActive, CString& strExpiration, CString& strVersion);
  85. void FillStaticRecData(CString& strType);
  86. void SetDefaultControlStates();
  87. void FillList();
  88. void SetRemoveButtonState();
  89. int m_fType;
  90. IPControl m_ipControl;
  91. CStringArray m_strArrayIPAdd;
  92. CDWordArray m_dwArrayIPAdd;
  93. // set if property changed for static mapping
  94. BOOL m_fStaticPropChanged;
  95. public:
  96. virtual DWORD * GetHelpMap() { return WinsGetHelpMap(m_uIDD);}
  97. };
  98. class CStaticMappingProperties:public CPropertyPageHolderBase
  99. {
  100. public:
  101. CStaticMappingProperties(ITFSNode * pNode,
  102. IComponent * pComponent,
  103. LPCTSTR pszSheetName,
  104. WinsRecord* pwRecord = NULL,
  105. BOOL bWizard = FALSE);
  106. CStaticMappingProperties(ITFSNode * pNode,
  107. IComponentData * pComponentData,
  108. LPCTSTR pszSheetName,
  109. WinsRecord* pwRecord = NULL,
  110. BOOL bWizard = FALSE);
  111. virtual ~CStaticMappingProperties();
  112. void Init(WinsRecord * pwRecord);
  113. void InitPage(BOOL fWizard);
  114. HRESULT GetComponent(ITFSComponent ** ppComponent);
  115. HRESULT SetComponent(ITFSComponent * pComponent);
  116. public:
  117. CStaticMappingProp * m_ppageGeneral;
  118. WinsRecord m_wsRecord;
  119. BOOL m_bWizard;
  120. SPITFSComponent m_spTFSComponent;
  121. };
  122. //{{AFX_INSERT_LOCATION}}
  123. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  124. #endif // !defined _STATMAPP_H