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.

215 lines
5.9 KiB

  1. //-------------------------------------------------------------------------
  2. // File: EditPropertyDlgs.h
  3. //
  4. // Author : Kishnan Nedungadi
  5. //
  6. // created : 3/27/2000
  7. //-------------------------------------------------------------------------
  8. class CEditProperty
  9. {
  10. public:
  11. CEditProperty(HWND hWndParent, LPCTSTR pszName, LPCTSTR pszType, VARIANT * pvValue, IWbemServices *pIWbemServices, long lSpecialCaseProperty=0);
  12. ~CEditProperty();
  13. long Run();
  14. enum prop_special_cases
  15. {
  16. psc_rules = 0,
  17. psc_rule = 1,
  18. psc_ranges = 2,
  19. psc_range = 3
  20. };
  21. protected:
  22. HWND m_hWnd;
  23. VARIANT * pvSrcValue;
  24. CComBSTR m_bstrName;
  25. CComBSTR m_bstrType;
  26. CComPtr<IWbemServices>m_pIWbemServices;
  27. long m_lSpecialCaseProperty;
  28. };
  29. //-------------------------------------------------------------------------
  30. class CEditPropertyDlg
  31. {
  32. public:
  33. CEditPropertyDlg(LPCTSTR pszName, LPCTSTR pszType, VARIANT * pvValue);
  34. ~CEditPropertyDlg();
  35. CComVariant m_vValue;
  36. protected:
  37. virtual STDMETHODIMP InitializeDialog();
  38. virtual STDMETHODIMP DestroyDialog();
  39. HWND m_hWnd;
  40. VARIANT * pvSrcValue;
  41. CComBSTR m_bstrName;
  42. CComBSTR m_bstrType;
  43. };
  44. //-------------------------------------------------------------------------
  45. class CEditStringPropertyDlg : public CEditPropertyDlg
  46. {
  47. public:
  48. CEditStringPropertyDlg(LPCTSTR pszName, LPCTSTR pszType, VARIANT * pvValue);
  49. ~CEditStringPropertyDlg();
  50. INT_PTR CALLBACK EditStringPropertyDlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);
  51. STDMETHODIMP OnOK();
  52. protected:
  53. STDMETHODIMP InitializeDialog();
  54. STDMETHODIMP DestroyDialog();
  55. };
  56. //-------------------------------------------------------------------------
  57. class CEditNumberPropertyDlg : public CEditPropertyDlg
  58. {
  59. public:
  60. CEditNumberPropertyDlg(LPCTSTR pszName, LPCTSTR pszType, VARIANT * pvValue);
  61. ~CEditNumberPropertyDlg();
  62. INT_PTR CALLBACK EditNumberPropertyDlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);
  63. STDMETHODIMP OnOK();
  64. protected:
  65. STDMETHODIMP InitializeDialog();
  66. STDMETHODIMP DestroyDialog();
  67. };
  68. //-------------------------------------------------------------------------
  69. class CEditRulesPropertyDlg : public CEditPropertyDlg
  70. {
  71. public:
  72. CEditRulesPropertyDlg(LPCTSTR pszName, LPCTSTR pszType, VARIANT * pvValue, IWbemServices *pIWbemServices);
  73. ~CEditRulesPropertyDlg();
  74. INT_PTR CALLBACK EditRulesPropertyDlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);
  75. STDMETHODIMP OnOK();
  76. STDMETHODIMP ClearItems();
  77. STDMETHODIMP PopulateItems();
  78. STDMETHODIMP AddItemToList(IWbemClassObject * pIWbemClassObject, long lIndex=MAX_LIST_ITEMS);
  79. STDMETHODIMP OnAdd();
  80. STDMETHODIMP OnEdit();
  81. STDMETHODIMP OnDelete();
  82. protected:
  83. STDMETHODIMP InitializeDialog();
  84. STDMETHODIMP DestroyDialog();
  85. HWND m_hwndListView;
  86. CComPtr<IWbemServices>m_pIWbemServices;
  87. };
  88. //-------------------------------------------------------------------------
  89. class CEditRulePropertyDlg
  90. {
  91. public:
  92. CEditRulePropertyDlg(IWbemClassObject* pIWbemClassObject);
  93. ~CEditRulePropertyDlg();
  94. INT_PTR CALLBACK EditRulePropertyDlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);
  95. STDMETHODIMP OnOK();
  96. protected:
  97. STDMETHODIMP InitializeDialog();
  98. STDMETHODIMP DestroyDialog();
  99. CComPtr<IWbemClassObject>m_pIWbemClassObject;
  100. HWND m_hWnd;
  101. };
  102. //-------------------------------------------------------------------------
  103. class CEditRangeParametersPropertyDlg : public CEditPropertyDlg
  104. {
  105. public:
  106. CEditRangeParametersPropertyDlg(LPCTSTR pszName, LPCTSTR pszType, VARIANT * pvValue, IWbemServices *pIWbemServices);
  107. ~CEditRangeParametersPropertyDlg();
  108. INT_PTR CALLBACK EditRangeParametersPropertyDlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);
  109. STDMETHODIMP OnOK();
  110. STDMETHODIMP ClearItems();
  111. STDMETHODIMP PopulateItems();
  112. STDMETHODIMP AddItemToList(IWbemClassObject * pIWbemClassObject, long lIndex=MAX_LIST_ITEMS);
  113. STDMETHODIMP OnAdd();
  114. STDMETHODIMP OnEdit();
  115. STDMETHODIMP OnDelete();
  116. protected:
  117. STDMETHODIMP InitializeDialog();
  118. STDMETHODIMP DestroyDialog();
  119. HWND m_hwndListView;
  120. CComPtr<IWbemServices>m_pIWbemServices;
  121. };
  122. //-------------------------------------------------------------------------
  123. class CEditRangeParameterPropertyDlg
  124. {
  125. public:
  126. CEditRangeParameterPropertyDlg(IWbemClassObject* pIWbemClassObject, IWbemServices* pIWbemServices);
  127. ~CEditRangeParameterPropertyDlg();
  128. INT_PTR CALLBACK EditRangeParameterPropertyDlgProc(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam);
  129. STDMETHODIMP OnOK();
  130. STDMETHODIMP ClearItems();
  131. STDMETHODIMP PopulateItems();
  132. STDMETHODIMP AddItemToList(IWbemClassObject * pIWbemClassObject, long lIndex=MAX_LIST_ITEMS);
  133. STDMETHODIMP OnAdd();
  134. STDMETHODIMP OnEdit();
  135. STDMETHODIMP OnDelete();
  136. STDMETHODIMP GetSintRangeValues();
  137. STDMETHODIMP SetSintRangeValues();
  138. STDMETHODIMP GetUintRangeValues();
  139. STDMETHODIMP SetUintRangeValues();
  140. STDMETHODIMP GetRealRangeValues();
  141. STDMETHODIMP SetRealRangeValues();
  142. STDMETHODIMP GetSintSetValues();
  143. STDMETHODIMP SetSintSetValues();
  144. STDMETHODIMP GetUintSetValues();
  145. STDMETHODIMP SetUintSetValues();
  146. STDMETHODIMP GetStringSetValues();
  147. STDMETHODIMP SetStringSetValues();
  148. STDMETHODIMP SetRangeParamValues();
  149. enum range_types
  150. {
  151. rt_sintrange = 0,
  152. rt_uintrange = 1,
  153. rt_realrange = 2,
  154. rt_sintset = 3,
  155. rt_uintset = 4,
  156. rt_stringset = 5
  157. };
  158. CComVariant m_vValue;
  159. protected:
  160. STDMETHODIMP InitializeDialog();
  161. STDMETHODIMP DestroyDialog();
  162. STDMETHODIMP ShowControls();
  163. HWND m_hwndListView;
  164. HWND m_hWnd;
  165. CComPtr<IWbemClassObject>m_pIWbemClassObject;
  166. CComPtr<IWbemServices>m_pIWbemServices;
  167. };
  168. //-------------------------------------------------------------------------