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.

76 lines
3.6 KiB

  1. /*****************************************************************************\
  2. FILE: thStyle.h
  3. DESCRIPTION:
  4. This is the Autmation Object to theme style object. This one will be
  5. for the Skin objects.
  6. BryanSt 5/13/2000 (Bryan Starbuck)
  7. Copyright (C) Microsoft Corp 2000-2000. All rights reserved.
  8. \*****************************************************************************/
  9. #ifndef _FILE_H_THSTYLE
  10. #define _FILE_H_THSTYLE
  11. #include <cowsite.h>
  12. #include <atlbase.h>
  13. HRESULT CSkinStyle_CreateInstance(IN LPCWSTR pszFilename, IN LPCWSTR pszStyleName, IN LPCWSTR pszDisplayName, OUT IThemeStyle ** ppThemeStyle);
  14. HRESULT CSkinStyle_CreateInstance(IN LPCWSTR pszFilename, IN LPCWSTR pszStyleName, OUT IThemeStyle ** ppThemeStyle);
  15. class CSkinStyle : public CImpIDispatch
  16. , public IThemeStyle
  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. // *** IThemeStyle ***
  27. virtual STDMETHODIMP get_DisplayName(OUT BSTR * pbstrDisplayName);
  28. virtual STDMETHODIMP put_DisplayName(IN BSTR bstrDisplayName);
  29. virtual STDMETHODIMP get_Name(OUT BSTR * pbstrName);
  30. virtual STDMETHODIMP put_Name(IN BSTR bstrName);
  31. virtual STDMETHODIMP get_length(OUT long * pnLength);
  32. virtual STDMETHODIMP get_item(IN VARIANT varIndex, OUT IThemeSize ** ppThemeSize);
  33. virtual STDMETHODIMP get_SelectedSize(OUT IThemeSize ** ppThemeSize);
  34. virtual STDMETHODIMP put_SelectedSize(IN IThemeSize * pThemeSize);
  35. virtual STDMETHODIMP AddSize(OUT IThemeSize ** ppThemeSize);
  36. // *** IDispatch ***
  37. virtual STDMETHODIMP GetTypeInfoCount(UINT *pctinfo) { return CImpIDispatch::GetTypeInfoCount(pctinfo); }
  38. virtual STDMETHODIMP GetTypeInfo(UINT itinfo,LCID lcid,ITypeInfo **pptinfo) { return CImpIDispatch::GetTypeInfo(itinfo, lcid, pptinfo); }
  39. virtual STDMETHODIMP GetIDsOfNames(REFIID riid,OLECHAR **rgszNames,UINT cNames, LCID lcid, DISPID * rgdispid) { return CImpIDispatch::GetIDsOfNames(riid, rgszNames, cNames, lcid, rgdispid); }
  40. 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); }
  41. private:
  42. CSkinStyle(IN LPCWSTR pszFilename, IN LPCWSTR pszStyleName, IN LPCWSTR pszDisplayName);
  43. virtual ~CSkinStyle(void);
  44. // Private Member Variables
  45. long m_cRef;
  46. LPWSTR m_pszFilename; // This is the full path to the ".thx" file
  47. LPWSTR m_pszDisplayName; // This is the display name of the color style
  48. LPWSTR m_pszStyleName; // This is the canonical name of the color style
  49. long m_nSize; // The size of the collection of Sizes.
  50. IThemeSize * m_pSelectedSize; // The selected size.
  51. // Private Member Functions
  52. // Friend Functions
  53. friend HRESULT CSkinStyle_CreateInstance(IN LPCWSTR pszFilename, IN LPCWSTR pszStyleName, IN LPCWSTR pszDisplayName, OUT IThemeStyle ** ppThemeStyle);
  54. friend HRESULT CSkinStyle_CreateInstance(IN LPCWSTR pszFilename, IN LPCWSTR pszStyleName, OUT IThemeStyle ** ppThemeStyle);
  55. };
  56. #endif // _FILE_H_THSTYLE