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.

107 lines
4.5 KiB

  1. //---------------------------------------------------------------------------
  2. // TmReg.h - theme manager registry access routines
  3. //---------------------------------------------------------------------------
  4. #pragma once
  5. // --------------------------------------------------------------------------
  6. // CCurrentUser
  7. //
  8. // Purpose: Manages obtaining HKEY_CURRENT_USER even when impersonation
  9. // is in effect to ensure that the correct user hive is
  10. // referenced.
  11. //
  12. // History: 2000-08-11 vtan created
  13. // --------------------------------------------------------------------------
  14. class CCurrentUser
  15. {
  16. private:
  17. CCurrentUser (void);
  18. public:
  19. CCurrentUser (REGSAM samDesired);
  20. ~CCurrentUser (void);
  21. operator HKEY (void) const;
  22. private:
  23. HKEY _hKeyCurrentUser;
  24. };
  25. //---------------------------------------------------------------------------
  26. // Theme registry keys (exposed ones in uxthemep.h)
  27. //---------------------------------------------------------------------------
  28. //---- key root ----
  29. #define THEMEMGR_REGKEY L"Software\\Microsoft\\Windows\\CurrentVersion\\ThemeManager"
  30. #define THEMES_REGKEY L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes"
  31. //---- theme active/loaded before ----
  32. #define THEMEPROP_THEMEACTIVE L"ThemeActive"
  33. #define THEMEPROP_LOADEDBEFORE L"LoadedBefore"
  34. //---- local machine -to- current user propogation keys ----
  35. #define THEMEPROP_LMVERSION L"LMVersion"
  36. #define THEMEPROP_LMOVERRIDE L"LMOverRide"
  37. //---- theme identification ----
  38. #define THEMEPROP_DLLNAME L"DllName"
  39. #define THEMEPROP_COLORNAME L"ColorName"
  40. #define THEMEPROP_SIZENAME L"SizeName"
  41. #define THEMEPROP_LANGID L"LastUserLangID"
  42. //---- theme loading options ----
  43. #define THEMEPROP_COMPOSITING L"Compositing"
  44. #define THEMEPROP_DISABLECACHING L"DisableCaching"
  45. //---- obsolete loading options ----
  46. #define THEMEPROP_TARGETAPP L"TargetApp"
  47. #define THEMEPROP_EXCLUDETARGETAPP L"ExcludeTarget"
  48. #define THEMEPROP_DISABLEFRAMES L"DisableFrames"
  49. #define THEMEPROP_DISABLEDIALOGS L"DisableDialogs"
  50. //---- debug logging ----
  51. #define THEMEPROP_LOGCMD L"LogCmd"
  52. #define THEMEPROP_BREAKCMD L"BreakCmd"
  53. #define THEMEPROP_LOGAPPNAME L"LogAppName"
  54. //---- custom app theming ----
  55. #define THEMEPROP_CUSTOMAPPS L"Apps"
  56. #ifdef __TRAP_360180__
  57. #define THEMEPROP_TRAP360180 L"ShrinkTrap"
  58. #endif __TRAP_360180__
  59. //---- themeui values ----
  60. #define CONTROLPANEL_APPEARANCE_REGKEY L"Control Panel\\Appearance"
  61. #define REGVALUE_THEMESSETUPVER L"SetupVersion"
  62. #define THEMEPROP_WHISTLERBUILD L"WCreatedUser"
  63. #define THEMEPROP_CURRSCHEME L"Current" // This key is stored under CU,"Control Panel\Appearance"
  64. #define THEMEPROP_NEWCURRSCHEME L"NewCurrent" // This key is stored under CU,"Control Panel\Appearance" and will be set to the Whistler selected Appearance scheme.
  65. #define SZ_INSTALL_VS L"/InstallVS:'"
  66. #define SZ_USER_INSTALL L"/UserInstall"
  67. #define SZ_DEFAULTVS_OFF L"DefaultVisualStyleOff"
  68. #define SZ_INSTALLVISUALSTYLE L"InstallVisualStyle"
  69. #define SZ_INSTALLVISUALSTYLECOLOR L"InstallVisualStyleColor"
  70. #define SZ_INSTALLVISUALSTYLESIZE L"InstallVisualStyleSize"
  71. //---- policy values ----
  72. #define SZ_POLICY_SETVISUALSTYLE L"SetVisualStyle"
  73. #define SZ_THEME_POLICY_KEY L"System"
  74. //---------------------------------------------------------------------------
  75. HRESULT GetCurrentUserThemeInt(LPCWSTR pszValueName, int iDefaultValue, int *piValue);
  76. HRESULT SetCurrentUserThemeInt(LPCWSTR pszValueName, int iValue);
  77. HRESULT GetCurrentUserString(LPCWSTR pszKeyName, LPCWSTR pszValueName, LPCWSTR pszDefaultValue,
  78. LPWSTR pszBuff, DWORD dwMaxBuffChars);
  79. HRESULT SetCurrentUserString(LPCWSTR pszKeyName, LPCWSTR pszValueName, LPCWSTR pszValue);
  80. HRESULT GetCurrentUserThemeString(LPCWSTR pszValueName, LPCWSTR pszDefaultValue,
  81. LPWSTR pszBuff, DWORD dwMaxBuffChars);
  82. HRESULT SetCurrentUserThemeString(LPCWSTR pszValueName, LPCWSTR pszValue);
  83. HRESULT SetCurrentUserThemeStringExpand(LPCWSTR pszValueName, LPCWSTR pszValue);
  84. HRESULT DeleteCurrentUserThemeValue(LPCWSTR pszKeyName);
  85. BOOL IsRemoteThemeDisabled();
  86. //---------------------------------------------------------------------------