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.

69 lines
808 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. DisableThemes.cpp
  5. Abstract:
  6. This shim is for apps that don't support themes.
  7. Notes:
  8. This is a general purpose shim.
  9. History:
  10. 01/15/2001 clupu Created
  11. --*/
  12. #include "precomp.h"
  13. IMPLEMENT_SHIM_BEGIN(DisableThemes)
  14. #include "ShimHookMacro.h"
  15. #include "uxtheme.h"
  16. APIHOOK_ENUM_BEGIN
  17. APIHOOK_ENUM_END
  18. void
  19. TurnOffThemes(
  20. void
  21. )
  22. {
  23. LOGN( eDbgLevelError, "[TurnOffThemes] Turning off themes");
  24. SetThemeAppProperties(0);
  25. }
  26. BOOL
  27. NOTIFY_FUNCTION(
  28. DWORD fdwReason
  29. )
  30. {
  31. if (fdwReason == SHIM_STATIC_DLLS_INITIALIZED) {
  32. TurnOffThemes();
  33. }
  34. return TRUE;
  35. }
  36. /*++
  37. Register hooked functions
  38. --*/
  39. HOOK_BEGIN
  40. CALL_NOTIFY_FUNCTION
  41. HOOK_END
  42. IMPLEMENT_SHIM_END