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.

73 lines
3.0 KiB

  1. /*****************************************************************************\
  2. FILE: thScheme.h
  3. DESCRIPTION:
  4. This is the Autmation Object to theme scheme object. This one will be
  5. a skin.
  6. BryanSt 5/9/2000 (Bryan Starbuck)
  7. Copyright (C) Microsoft Corp 2000-2000. All rights reserved.
  8. \*****************************************************************************/
  9. #ifndef _FILE_H_THSCHEME
  10. #define _FILE_H_THSCHEME
  11. #include <cowsite.h>
  12. #include <atlbase.h>
  13. static const GUID CLSID_SkinScheme = { 0x570fdefa, 0x5907, 0x47fe, { 0x96, 0x6b, 0x90, 0x30, 0xb4, 0xba, 0x10, 0xcd } };// {570FDEFA-5907-47fe-966B-9030B4BA10CD}
  14. HRESULT CSkinScheme_CreateInstance(IN LPCWSTR pszFilename, OUT IThemeScheme ** ppThemeScheme);
  15. class CSkinScheme : public CObjectCLSID
  16. , public IThemeScheme
  17. {
  18. public:
  19. //////////////////////////////////////////////////////
  20. // Public Interfaces
  21. //////////////////////////////////////////////////////
  22. // *** IUnknown ***
  23. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  24. virtual STDMETHODIMP_(ULONG) AddRef(void);
  25. virtual STDMETHODIMP_(ULONG) Release(void);
  26. // *** IThemeScheme ***
  27. virtual STDMETHODIMP get_DisplayName(OUT BSTR * pbstrDisplayName);
  28. virtual STDMETHODIMP put_DisplayName(IN BSTR bstrDisplayName) {return E_NOTIMPL;}
  29. virtual STDMETHODIMP get_Path(OUT BSTR * pbstrPath);
  30. virtual STDMETHODIMP put_Path(IN BSTR bstrPath);
  31. virtual STDMETHODIMP get_length(OUT long * pnLength);
  32. virtual STDMETHODIMP get_item(IN VARIANT varIndex, OUT IThemeStyle ** ppThemeStyle);
  33. virtual STDMETHODIMP get_SelectedStyle(OUT IThemeStyle ** ppThemeStyle);
  34. virtual STDMETHODIMP put_SelectedStyle(IN IThemeStyle * pThemeStyle);
  35. virtual STDMETHODIMP AddStyle(OUT IThemeStyle ** ppThemeStyle);
  36. // *** IDispatch ***
  37. virtual STDMETHODIMP GetTypeInfoCount(UINT *pctinfo) { return E_ACCESSDENIED; }
  38. virtual STDMETHODIMP GetTypeInfo(UINT itinfo,LCID lcid,ITypeInfo **pptinfo) { return E_ACCESSDENIED; }
  39. virtual STDMETHODIMP GetIDsOfNames(REFIID riid,OLECHAR **rgszNames,UINT cNames, LCID lcid, DISPID * rgdispid) { return E_ACCESSDENIED; }
  40. virtual STDMETHODIMP Invoke(DISPID dispidMember,REFIID riid,LCID lcid,WORD wFlags, DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo,UINT * puArgErr) { return E_ACCESSDENIED; }
  41. private:
  42. CSkinScheme(IN LPCWSTR pszFilename);
  43. virtual ~CSkinScheme(void);
  44. // Private Member Variables
  45. long m_cRef;
  46. IThemeStyle * m_pSelectedStyle; // The selected style.
  47. LPWSTR m_pszFilename; // This is the full path to the ".thx" file
  48. long m_nSize; // The size of the collection of "Color Styles".
  49. // Private Member Functions
  50. // Friend Functions
  51. friend HRESULT CSkinScheme_CreateInstance(IN LPCWSTR pszFilename, OUT IThemeScheme ** ppThemeScheme);
  52. };
  53. #endif // _FILE_H_THSCHEME