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.

70 lines
2.8 KiB

  1. /*****************************************************************************\
  2. FILE: appStyle.h
  3. DESCRIPTION:
  4. This is the Autmation Object to theme scheme object.
  5. BryanSt 4/3/2000 (Bryan Starbuck)
  6. Copyright (C) Microsoft Corp 2000-2000. All rights reserved.
  7. \*****************************************************************************/
  8. #ifndef _FILE_H_APPSTYLE
  9. #define _FILE_H_APPSTYLE
  10. #include <cowsite.h>
  11. #include <atlbase.h>
  12. HRESULT CAppearanceStyle_CreateInstance(IN HKEY hkeyStyle, OUT IThemeStyle ** ppThemeStyle);
  13. class CAppearanceStyle : public CImpIDispatch
  14. , public IThemeStyle
  15. {
  16. public:
  17. //////////////////////////////////////////////////////
  18. // Public Interfaces
  19. //////////////////////////////////////////////////////
  20. // *** IUnknown ***
  21. virtual STDMETHODIMP QueryInterface(REFIID riid, LPVOID * ppvObj);
  22. virtual STDMETHODIMP_(ULONG) AddRef(void);
  23. virtual STDMETHODIMP_(ULONG) Release(void);
  24. // *** IThemeStyle ***
  25. virtual STDMETHODIMP get_DisplayName(OUT BSTR * pbstrDisplayName);
  26. virtual STDMETHODIMP put_DisplayName(IN BSTR bstrDisplayName);
  27. virtual STDMETHODIMP get_Name(OUT BSTR * pbstrName);
  28. virtual STDMETHODIMP put_Name(IN BSTR bstrName);
  29. virtual STDMETHODIMP get_length(OUT long * pnLength);
  30. virtual STDMETHODIMP get_item(IN VARIANT varIndex, OUT IThemeSize ** ppThemeSize);
  31. virtual STDMETHODIMP get_SelectedSize(OUT IThemeSize ** ppThemeSize);
  32. virtual STDMETHODIMP put_SelectedSize(IN IThemeSize * pThemeSize);
  33. virtual STDMETHODIMP AddSize(OUT IThemeSize ** ppThemeSize);
  34. // *** IDispatch ***
  35. virtual STDMETHODIMP GetTypeInfoCount(UINT *pctinfo) { return CImpIDispatch::GetTypeInfoCount(pctinfo); }
  36. virtual STDMETHODIMP GetTypeInfo(UINT itinfo,LCID lcid,ITypeInfo **pptinfo) { return CImpIDispatch::GetTypeInfo(itinfo, lcid, pptinfo); }
  37. virtual STDMETHODIMP GetIDsOfNames(REFIID riid,OLECHAR **rgszNames,UINT cNames, LCID lcid, DISPID * rgdispid) { return CImpIDispatch::GetIDsOfNames(riid, rgszNames, cNames, lcid, rgdispid); }
  38. 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); }
  39. private:
  40. CAppearanceStyle(IN HKEY hkeyStyle);
  41. virtual ~CAppearanceStyle(void);
  42. // Private Member Variables
  43. long m_cRef;
  44. HKEY m_hKeyStyle;
  45. // Private Member Functions
  46. HRESULT _getSizeByIndex(IN long nIndex, OUT IThemeSize ** ppThemeSize);
  47. // Friend Functions
  48. friend HRESULT CAppearanceStyle_CreateInstance(IN HKEY hkeyStyle, OUT IThemeStyle ** ppThemeStyle);
  49. };
  50. #endif // _FILE_H_APPSTYLE