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.

100 lines
3.4 KiB

  1. /*****************************************************************************\
  2. FILE: store.h
  3. DESCRIPTION:
  4. This file will get and set effect settings into the persisted store.
  5. That persisted store is the registery and in SystemParametersInfo.
  6. BryanSt 4/17/2000
  7. Copyright (C) Microsoft Corp 2000-2000. All rights reserved.
  8. \*****************************************************************************/
  9. #ifndef _STORE_H
  10. #define _STORE_H
  11. #define MENU_EFFECT_FADE 1
  12. #define MENU_EFFECT_SCROLL 2
  13. #define FONT_SMOOTHING_MONO 0
  14. #define FONT_SMOOTHING_AA 1
  15. #define FONT_SMOOTHING_CT 2
  16. #define PATH_WIN 0
  17. #define PATH_SYS 1
  18. #define PATH_IEXP 2
  19. enum ICON_SIZE_TYPES {
  20. ICON_DEFAULT = 0,
  21. ICON_LARGE = 1,
  22. ICON_INDETERMINATE = 2
  23. };
  24. #define ICON_DEFAULT_SMALL 16
  25. #define ICON_DEFAULT_NORMAL 32
  26. #define ICON_DEFAULT_LARGE 48
  27. extern GUID CLSID_EffectsPage;
  28. class CEffectState
  29. {
  30. public:
  31. // Private Member Variables
  32. int _nLargeIcon; // Large Icon State (iOldLI, iNewLI)
  33. int _nHighIconColor; // High Icon Colour (iOldHIC, iNewHIC)
  34. WPARAM _wpMenuAnimation; // Menu Animation State (wOldMA, wNewMA)
  35. BOOL _fFontSmoothing; // Font Smoothing State (bOldSF, bNewSF)
  36. DWORD _dwFontSmoothingType; // Font Smoothing Type (dwOldSFT, dwNewSFT)
  37. BOOL _fDragWindow; // Drag Window State (bOldDW, bNewDW)
  38. BOOL _fKeyboardIndicators; // Keyboard Indicators (uOldKI, uNewKI)
  39. DWORD _dwAnimationEffect; // Animation Effect (dwOldEffect, dwNewEffect)
  40. BOOL _fMenuShadows; // Show Menu Shadows
  41. // Old values (before they were dirtied)
  42. int _nOldLargeIcon; // Large Icon State (iOldLI)
  43. int _nOldHighIconColor; // High Icon Colour (iOldHIC)
  44. WPARAM _wpOldMenuAnimation; // Menu Animation State (wOldMA)
  45. BOOL _fOldFontSmoothing; // Font Smoothing State (bOldSF)
  46. DWORD _dwOldFontSmoothingType; // Font Smoothing Type (dwOldSFT)
  47. BOOL _fOldDragWindow; // Drag Window State (bOldDW)
  48. BOOL _fOldKeyboardIndicators; // Keyboard Indicators (uOldKI)
  49. DWORD _dwOldAnimationEffect; // Animation Effect (dwOldEffect)
  50. BOOL _fOldMenuShadows; // Show Menu Shadows
  51. // Private Member Functions
  52. HRESULT Load(void);
  53. HRESULT Save(void);
  54. HRESULT Clone(OUT CEffectState ** ppEffectClone);
  55. BOOL IsDirty(void);
  56. HRESULT GetIconPath(IN CLSID clsid, IN LPCWSTR pszName, IN LPWSTR pszPath, IN DWORD cchSize);
  57. HRESULT SetIconPath(IN CLSID clsid, IN LPCWSTR pszName, IN LPCWSTR pszPath, IN int nResourceID);
  58. CEffectState(void);
  59. STDMETHODIMP_(ULONG) AddRef(void);
  60. STDMETHODIMP_(ULONG) Release(void);
  61. private:
  62. // Private Member Variables
  63. long m_cRef;
  64. // Private Member Functions
  65. HRESULT _SaveWorkerProc(void);
  66. HRESULT _SaveSettings(BOOL fBroadcast);
  67. static DWORD CALLBACK Save_WorkerProc(void * pThis);
  68. };
  69. int GetBitsPerPixel(void);
  70. extern HINSTANCE g_hmodShell32;
  71. #endif // _STORE_H