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.

351 lines
8.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation 1996-2001.
  5. //
  6. // File: regvldlg.h
  7. //
  8. // Contents: definition of CSceRegistryValueInfo
  9. // CConfigRegEnable
  10. // CAttrRegEnable
  11. // CLocalPolRegEnable
  12. // CConfigRegNumber
  13. // CAttrRegNumber
  14. // CLocalPolRegNumber
  15. // CConfigRegString
  16. // CAttrRegString
  17. // CLocalPolRegString
  18. // CConfigRegChoice
  19. // CAttrRegChoice
  20. // CLocalPolRegChoice
  21. //
  22. //----------------------------------------------------------------------------
  23. #if !defined(AFX_REGVLDLG_H__7F9B3B38_ECEB_11D0_9C6E_00C04FB6C6FA__INCLUDED_)
  24. #define AFX_REGVLDLG_H__7F9B3B38_ECEB_11D0_9C6E_00C04FB6C6FA__INCLUDED_
  25. #if _MSC_VER >= 1000
  26. #pragma once
  27. #endif // _MSC_VER >= 1000
  28. #include "cenable.h"
  29. #include "aenable.h"
  30. #include "lenable.h"
  31. #include "cnumber.h"
  32. #include "anumber.h"
  33. #include "lnumber.h"
  34. #include "cname.h"
  35. #include "astring.h"
  36. #include "lstring.h"
  37. #include "cret.h"
  38. #include "aret.h"
  39. #include "lret.h"
  40. //
  41. // Class to encapsulate the SCE_REGISTRY_VALUE_INFO structure.
  42. class CSceRegistryValueInfo
  43. {
  44. public:
  45. CSceRegistryValueInfo(
  46. PSCE_REGISTRY_VALUE_INFO pInfo
  47. );
  48. BOOL Attach(
  49. PSCE_REGISTRY_VALUE_INFO pInfo
  50. )
  51. { if(pInfo) {m_pRegInfo = pInfo; return TRUE;} return FALSE; };
  52. DWORD
  53. GetBoolValue(); // Returns a boolean type.
  54. DWORD
  55. SetBoolValue( // Sets the boolean value.
  56. DWORD dwVal
  57. );
  58. LPCTSTR
  59. GetValue() // Returns the string pointer of the value
  60. { return ((m_pRegInfo && m_pRegInfo->Value) ? m_pRegInfo->Value:NULL); };
  61. DWORD
  62. GetType() // Returns the type reg type of the object.
  63. { return (m_pRegInfo ? m_pRegInfo->ValueType:0); };
  64. void
  65. SetType(DWORD dwType) // Sets the type of this object.
  66. { if(m_pRegInfo) m_pRegInfo->ValueType = dwType; };
  67. LPCTSTR
  68. GetName() // Returns the name of this object.
  69. { return (m_pRegInfo ? m_pRegInfo->FullValueName:NULL); };
  70. DWORD
  71. GetStatus() // Return status member of this object.
  72. { return (m_pRegInfo ? m_pRegInfo->Status:ERROR_INVALID_PARAMETER); };
  73. protected:
  74. PSCE_REGISTRY_VALUE_INFO m_pRegInfo;
  75. };
  76. #define SCE_RETAIN_ALWAYS 0
  77. #define SCE_RETAIN_AS_REQUEST 1
  78. #define SCE_RETAIN_NC 2
  79. /////////////////////////////////////////////////////////////////////////////
  80. // CConfigEnable dialog
  81. class CConfigRegEnable : public CConfigEnable
  82. {
  83. // Construction
  84. public:
  85. CConfigRegEnable (UINT nTemplateID) :
  86. CConfigEnable (nTemplateID ? nTemplateID : IDD)
  87. {
  88. }
  89. // Implementation
  90. protected:
  91. // Generated message map functions
  92. //{{AFX_MSG(CConfigRegEnable)
  93. virtual BOOL OnApply();
  94. //}}AFX_MSG
  95. virtual BOOL UpdateProfile( );
  96. public:
  97. virtual void Initialize(CResult *pdata);
  98. };
  99. class CAttrRegEnable : public CAttrEnable
  100. {
  101. // Construction
  102. public:
  103. CAttrRegEnable () : CAttrEnable (IDD)
  104. {
  105. }
  106. virtual void Initialize(CResult *pResult);
  107. virtual void UpdateProfile( DWORD dwStatus );
  108. // Implementation
  109. protected:
  110. // Generated message map functions
  111. //{{AFX_MSG(CAttrRegEnable)
  112. virtual BOOL OnApply();
  113. //}}AFX_MSG
  114. };
  115. class CLocalPolRegEnable : public CConfigRegEnable
  116. {
  117. // Construction
  118. public:
  119. enum { IDD = IDD_LOCALPOL_ENABLE };
  120. CLocalPolRegEnable() : CConfigRegEnable(IDD)
  121. {
  122. m_pHelpIDs = (DWORD_PTR)a227HelpIDs;
  123. m_uTemplateResID = IDD;
  124. }
  125. virtual void Initialize(CResult *pResult);
  126. virtual BOOL UpdateProfile( );
  127. };
  128. /////////////////////////////////////////////////////////////////////////////
  129. // CConfigRegNumber dialog
  130. class CConfigRegNumber : public CConfigNumber
  131. {
  132. // Construction
  133. public:
  134. CConfigRegNumber(UINT nTemplateID);
  135. // Generated message map functions
  136. //{{AFX_MSG(CConfigRegNumber)
  137. virtual BOOL OnApply();
  138. //}}AFX_MSG
  139. virtual void UpdateProfile();
  140. public:
  141. virtual void Initialize(CResult *pResult);
  142. };
  143. /////////////////////////////////////////////////////////////////////////////
  144. // CAttrRegNumber dialog
  145. class CAttrRegNumber : public CAttrNumber
  146. {
  147. // Construction
  148. public:
  149. CAttrRegNumber();
  150. virtual void UpdateProfile( DWORD status );
  151. virtual void Initialize(CResult * pResult);
  152. // Implementation
  153. protected:
  154. // Generated message map functions
  155. //{{AFX_MSG(CAttrRegNumber)
  156. virtual BOOL OnApply();
  157. //}}AFX_MSG
  158. };
  159. /////////////////////////////////////////////////////////////////////////////
  160. // CLocalPolRegNumber dialog
  161. class CLocalPolRegNumber : public CConfigRegNumber
  162. {
  163. // Construction
  164. public:
  165. enum { IDD = IDD_LOCALPOL_NUMBER };
  166. CLocalPolRegNumber();
  167. virtual void Initialize(CResult *pResult);
  168. virtual void SetInitialValue(DWORD_PTR dw);
  169. virtual void UpdateProfile();
  170. private:
  171. BOOL m_bInitialValueSet;
  172. };
  173. /////////////////////////////////////////////////////////////////////////////
  174. // CConfigRegString dialog
  175. class CConfigRegString : public CConfigName
  176. {
  177. // Construction
  178. public:
  179. CConfigRegString (UINT nTemplateID) :
  180. CConfigName (nTemplateID ? nTemplateID : IDD)
  181. {
  182. }
  183. virtual void Initialize(CResult * pResult);
  184. // Implementation
  185. protected:
  186. // Generated message map functions
  187. //{{AFX_MSG(CConfigRegString)
  188. virtual BOOL OnApply();
  189. //}}AFX_MSG
  190. virtual BOOL UpdateProfile( );
  191. virtual BOOL QueryMultiSZ() { return FALSE; }
  192. };
  193. /////////////////////////////////////////////////////////////////////////////
  194. // CAttrString dialog
  195. class CAttrRegString : public CAttrString
  196. {
  197. // Construction
  198. public:
  199. CAttrRegString (UINT nTemplateID) :
  200. CAttrString (nTemplateID ? nTemplateID : IDD)
  201. {
  202. }
  203. virtual void Initialize(CResult * pResult);
  204. virtual void UpdateProfile( DWORD status );
  205. // Implementation
  206. protected:
  207. // Generated message map functions
  208. //{{AFX_MSG(CAttrRegString)
  209. // NOTE: the ClassWizard will add member functions here
  210. virtual BOOL OnApply();
  211. //}}AFX_MSG
  212. virtual BOOL QueryMultiSZ() { return FALSE; }
  213. };
  214. /////////////////////////////////////////////////////////////////////////////
  215. // CLocalPolRegString dialog
  216. class CLocalPolRegString : public CConfigRegString
  217. {
  218. public:
  219. enum { IDD = IDD_LOCALPOL_STRING };
  220. CLocalPolRegString(UINT nTemplateID) :
  221. CConfigRegString(nTemplateID ? nTemplateID : IDD)
  222. {
  223. m_uTemplateResID = IDD;
  224. }
  225. virtual BOOL UpdateProfile( );
  226. virtual void Initialize(CResult *pResult);
  227. // Implementation
  228. protected:
  229. };
  230. /////////////////////////////////////////////////////////////////////////////
  231. // CConfigRet dialog
  232. class CConfigRegChoice : public CConfigRet
  233. {
  234. // Construction
  235. public:
  236. CConfigRegChoice (UINT nTemplateID) :
  237. CConfigRet (nTemplateID ? nTemplateID : IDD)
  238. {
  239. }
  240. void Initialize(CResult * pResult);
  241. // Implementation
  242. protected:
  243. // Generated message map functions
  244. //{{AFX_MSG(CConfigRegChoice)
  245. virtual BOOL OnInitDialog();
  246. virtual BOOL OnApply();
  247. //}}AFX_MSG
  248. virtual void UpdateProfile( DWORD status );
  249. };
  250. /////////////////////////////////////////////////////////////////////////////
  251. // CAttrRegChoice dialog
  252. class CAttrRegChoice : public CAttrRet
  253. {
  254. // construction
  255. public:
  256. virtual void Initialize(CResult * pResult);
  257. virtual void UpdateProfile( DWORD status );
  258. // Implementation
  259. protected:
  260. // Generated message map functions
  261. //{{AFX_MSG(CAttrRegChoice)
  262. virtual BOOL OnInitDialog();
  263. virtual BOOL OnApply();
  264. //}}AFX_MSG
  265. };
  266. /////////////////////////////////////////////////////////////////////////////
  267. // CLocalPolRegChoice dialog
  268. class CLocalPolRegChoice : public CConfigRegChoice
  269. {
  270. enum { IDD = IDD_LOCALPOL_REGCHOICES };
  271. // construction
  272. public:
  273. CLocalPolRegChoice(UINT nTemplateID) :
  274. CConfigRegChoice(nTemplateID ? nTemplateID : IDD)
  275. {
  276. m_uTemplateResID = IDD;
  277. }
  278. virtual void UpdateProfile( DWORD status );
  279. virtual void Initialize(CResult *pResult);
  280. };
  281. //{{AFX_INSERT_LOCATION}}
  282. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  283. #endif // !defined(AFX_REGVLDLG_H__7F9B3B38_ECEB_11D0_9C6E_00C04FB6C6FA__INCLUDED_)