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.

67 lines
1004 B

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. IgnoreSysColChanges.cpp
  5. Abstract:
  6. Do not change system colors. Of course this changes the behaviour between
  7. 9x and NT, but we're trying to make the experience better.
  8. Notes:
  9. This is a general purpose shim.
  10. History:
  11. 07/17/2000 linstev Created
  12. --*/
  13. #include "precomp.h"
  14. IMPLEMENT_SHIM_BEGIN(IgnoreSysColChanges)
  15. #include "ShimHookMacro.h"
  16. APIHOOK_ENUM_BEGIN
  17. APIHOOK_ENUM_ENTRY(SetSysColors)
  18. APIHOOK_ENUM_END
  19. /*++
  20. Ignore changes to system colors
  21. --*/
  22. BOOL
  23. APIHOOK(SetSysColors)(
  24. int cElements,
  25. CONST INT *lpaElements,
  26. CONST COLORREF *lpaRgbValues
  27. )
  28. {
  29. LOGN(
  30. eDbgLevelInfo,
  31. "Ignoring changes to system colors");
  32. return TRUE;
  33. }
  34. /*++
  35. Register hooked functions
  36. --*/
  37. HOOK_BEGIN
  38. APIHOOK_ENTRY(USER32.DLL, SetSysColors)
  39. HOOK_END
  40. IMPLEMENT_SHIM_END