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.

78 lines
2.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: DisplEx.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // DisplEx.h : Declaration of the CDisplEx
  11. #ifndef __DISPLEX_H_
  12. #define __DISPLEX_H_
  13. #include "resource.h" // main symbols
  14. #include <asptlb.h> // Active Server Pages Definitions
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CDisplEx
  17. class ATL_NO_VTABLE CDisplEx :
  18. public CComObjectRootEx<CComSingleThreadModel>,
  19. public CComCoClass<CDisplEx, &CLSID_DisplEx>,
  20. public IExtendTaskPad
  21. {
  22. public:
  23. CDisplEx();
  24. ~CDisplEx();
  25. public:
  26. DECLARE_REGISTRY_RESOURCEID(IDR_DISPLEX)
  27. DECLARE_NOT_AGGREGATABLE(CDisplEx)
  28. BEGIN_COM_MAP(CDisplEx)
  29. COM_INTERFACE_ENTRY(IExtendTaskPad)
  30. END_COM_MAP()
  31. // IExtendTaskPad interface members
  32. STDMETHOD(TaskNotify )(IDataObject * pdo, VARIANT * pvarg, VARIANT * pvparam);
  33. STDMETHOD(GetTitle )(LPOLESTR szGroup, LPOLESTR * szTitle);
  34. STDMETHOD(GetDescriptiveText)(LPOLESTR szGroup, LPOLESTR * szText);
  35. STDMETHOD(GetBackground )(LPOLESTR szGroup, MMC_TASK_DISPLAY_OBJECT * pTDO);
  36. STDMETHOD(EnumTasks )(IDataObject * pdo, BSTR szTaskGroup, IEnumTASK** ppEnumTASK);
  37. STDMETHOD(GetListPadInfo )(LPOLESTR szGroup, MMC_LISTPAD_INFO * pListPadInfo);
  38. };
  39. class CEnumTasks : public IEnumTASK
  40. {
  41. public:
  42. CEnumTasks();
  43. ~CEnumTasks();
  44. public:
  45. // IUnknown implementation
  46. STDMETHOD(QueryInterface) (REFIID riid, LPVOID FAR* ppvObj);
  47. STDMETHOD_(ULONG, AddRef) ();
  48. STDMETHOD_(ULONG, Release) ();
  49. private:
  50. ULONG m_refs;
  51. public:
  52. // IEnumTASKS implementation
  53. STDMETHOD(Next) (ULONG celt, MMC_TASK *rgelt, ULONG *pceltFetched);
  54. STDMETHOD(Skip) (ULONG celt);
  55. STDMETHOD(Reset)();
  56. STDMETHOD(Clone)(IEnumTASK **ppenum);
  57. private:
  58. ULONG m_index;
  59. public:
  60. HRESULT Init (IDataObject * pdo, LPOLESTR szTaskGroup);
  61. private:
  62. int m_type; // task grouping mechanism
  63. };
  64. #endif //__DISPLEX_H_