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.

74 lines
3.2 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 CImpIDispatch
  16. , public CObjectCLSID
  17. , public IThemeScheme
  18. {
  19. public:
  20. //////////////////////////////////////////////////////
  21. // Public Interfaces
  22. //////////////////////////////////////////////////////
  23. // *** IUnknown ***
  24. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  25. virtual STDMETHODIMP_(ULONG) AddRef(void);
  26. virtual STDMETHODIMP_(ULONG) Release(void);
  27. // *** IThemeScheme ***
  28. virtual STDMETHODIMP get_DisplayName(OUT BSTR * pbstrDisplayName);
  29. virtual STDMETHODIMP put_DisplayName(IN BSTR bstrDisplayName) {return E_NOTIMPL;}
  30. virtual STDMETHODIMP get_Path(OUT BSTR * pbstrPath);
  31. virtual STDMETHODIMP put_Path(IN BSTR bstrPath);
  32. virtual STDMETHODIMP get_length(OUT long * pnLength);
  33. virtual STDMETHODIMP get_item(IN VARIANT varIndex, OUT IThemeStyle ** ppThemeStyle);
  34. virtual STDMETHODIMP get_SelectedStyle(OUT IThemeStyle ** ppThemeStyle);
  35. virtual STDMETHODIMP put_SelectedStyle(IN IThemeStyle * pThemeStyle);
  36. virtual STDMETHODIMP AddStyle(OUT IThemeStyle ** ppThemeStyle);
  37. // *** IDispatch ***
  38. virtual STDMETHODIMP GetTypeInfoCount(UINT *pctinfo) { return CImpIDispatch::GetTypeInfoCount(pctinfo); }
  39. virtual STDMETHODIMP GetTypeInfo(UINT itinfo,LCID lcid,ITypeInfo **pptinfo) { return CImpIDispatch::GetTypeInfo(itinfo, lcid, pptinfo); }
  40. virtual STDMETHODIMP GetIDsOfNames(REFIID riid,OLECHAR **rgszNames,UINT cNames, LCID lcid, DISPID * rgdispid) { return CImpIDispatch::GetIDsOfNames(riid, rgszNames, cNames, lcid, rgdispid); }
  41. virtual STDMETHODIMP Invoke(DISPID dispidMember,REFIID riid,LCID lcid,WORD wFlags, DISPPARAMS * pdispparams, VARIANT * pvarResult, EXCEPINFO * pexcepinfo,UINT * puArgErr) { return CImpIDispatch::Invoke(dispidMember, riid, lcid, wFlags, pdispparams, pvarResult, pexcepinfo, puArgErr); }
  42. private:
  43. CSkinScheme(IN LPCWSTR pszFilename);
  44. virtual ~CSkinScheme(void);
  45. // Private Member Variables
  46. long m_cRef;
  47. IThemeStyle * m_pSelectedStyle; // The selected style.
  48. LPWSTR m_pszFilename; // This is the full path to the ".thx" file
  49. long m_nSize; // The size of the collection of "Color Styles".
  50. // Private Member Functions
  51. // Friend Functions
  52. friend HRESULT CSkinScheme_CreateInstance(IN LPCWSTR pszFilename, OUT IThemeScheme ** ppThemeScheme);
  53. };
  54. #endif // _FILE_H_THSCHEME