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.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: dispobj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // MMCDisplayObject.h : Declaration of the CMMCDisplayObject
  11. #ifndef __DISPOBJ_H_
  12. #define __DISPOBJ_H_
  13. #include "resource.h" // main symbols
  14. #include "mmc.h"
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CMMCDisplayObject
  17. class ATL_NO_VTABLE CMMCDisplayObject :
  18. public CComObjectRootEx<CComSingleThreadModel>,
  19. public CComCoClass<CMMCDisplayObject, &CLSID_MMCDisplayObject>,
  20. public IDispatchImpl<IMMCDisplayObject, &IID_IMMCDisplayObject, &LIBID_CICLib>
  21. {
  22. public:
  23. CMMCDisplayObject();
  24. ~CMMCDisplayObject();
  25. HRESULT Init (MMC_TASK_DISPLAY_OBJECT * pdo);
  26. // Strange registration. Why does this class has MMCTask registration script here?
  27. // But this object is not in object-map, so ATL wont use this script.
  28. DECLARE_MMC_OBJECT_REGISTRATION(
  29. g_szCicDll,
  30. CLSID_MMCTask,
  31. _T("MMCTask class"),
  32. _T("MMCTask.MMCTask.1"),
  33. _T("MMCTask.MMCTask"))
  34. DECLARE_NOT_AGGREGATABLE(CMMCDisplayObject)
  35. BEGIN_COM_MAP(CMMCDisplayObject)
  36. COM_INTERFACE_ENTRY(IMMCDisplayObject)
  37. COM_INTERFACE_ENTRY(IDispatch)
  38. END_COM_MAP()
  39. // IMMCDisplayObject
  40. public:
  41. STDMETHOD(get_DisplayObjectType)(long* pVal);
  42. STDMETHOD(get_FontFamilyName )(BSTR* pVal);
  43. STDMETHOD(get_URLtoEOT )(BSTR* pVal);
  44. STDMETHOD(get_SymbolString )(BSTR* pVal);
  45. STDMETHOD(get_MouseOverBitmap )(BSTR* pVal);
  46. STDMETHOD(get_MouseOffBitmap )(BSTR* pVal);
  47. private:
  48. long m_type;
  49. BSTR m_bstrFontFamilyName;
  50. BSTR m_bstrURLtoEOT;
  51. BSTR m_bstrSymbolString;
  52. BSTR m_bstrMouseOffBitmap;
  53. BSTR m_bstrMouseOverBitmap;
  54. // Ensure that default copy constructor & assignment are not used.
  55. CMMCDisplayObject(const CMMCDisplayObject& rhs);
  56. CMMCDisplayObject& operator=(const CMMCDisplayObject& rhs);
  57. };
  58. #endif //__MMCTASK_H_