Leaked source code of windows server 2003
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.

142 lines
3.8 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation, 1997 - 1999
  4. Module Name:
  5. LogComp.h
  6. Abstract:
  7. The CLoggingComponent class implements several interfaces which MMC uses:
  8. The IComponent interface is basically how MMC talks to the snap-in
  9. to get it to implement a right-hand-side "scope" pane. There can be several
  10. objects implementing this interface instantiated at once. These are best
  11. thought of as "views" on the single object implementing the IComponentData
  12. "document" (see ComponentData.cpp).
  13. The IExtendPropertySheet interface is how the snap-in adds property sheets
  14. for any of the items a user might click on.
  15. The IExtendContextMenu interface what we do to add custom entries
  16. to the menu which appears when a user right-clicks on a node.
  17. The IExtendControlBar interface allows us to support a custom
  18. iconic toolbar.
  19. See Component.cpp for implementation details.
  20. Note:
  21. Much of the functionality of this class is implemented in atlsnap.h
  22. by IComponentImpl. We are mostly overriding here.
  23. Revision History:
  24. mmaguire 11/6/97 - created using MMC snap-in wizard
  25. --*/
  26. //////////////////////////////////////////////////////////////////////////////
  27. #if !defined(_LOG_COMPONENT_H_)
  28. #define _LOG_COMPONENT_H_
  29. //////////////////////////////////////////////////////////////////////////////
  30. // BEGIN INCLUDES
  31. //
  32. // where we can find what this class derives from:
  33. //
  34. //Moved to Precompiled.h: #include <atlsnap.h>
  35. //
  36. //
  37. // where we can find what this class has or uses:
  38. //
  39. #include "LogCompD.h"
  40. //
  41. // END INCLUDES
  42. //////////////////////////////////////////////////////////////////////////////
  43. class CLoggingComponent :
  44. public CComObjectRootEx<CComSingleThreadModel>
  45. , public CSnapInObjectRoot<2, CLoggingComponentData>
  46. , public IExtendPropertySheetImpl<CLoggingComponent>
  47. , public IExtendContextMenuImpl<CLoggingComponent>
  48. , public IExtendControlbarImpl<CLoggingComponent>
  49. , public IResultDataCompare
  50. , public IExtendTaskPadImpl<CLoggingComponent>
  51. , public IComponentImpl<CLoggingComponent>
  52. {
  53. public:
  54. BEGIN_COM_MAP(CLoggingComponent)
  55. COM_INTERFACE_ENTRY(IComponent)
  56. COM_INTERFACE_ENTRY(IExtendPropertySheet2)
  57. COM_INTERFACE_ENTRY(IExtendContextMenu)
  58. COM_INTERFACE_ENTRY(IExtendControlbar)
  59. COM_INTERFACE_ENTRY(IResultDataCompare)
  60. COM_INTERFACE_ENTRY(IExtendTaskPad)
  61. END_COM_MAP()
  62. CLoggingComponent();
  63. ~CLoggingComponent();
  64. // We are overiding ATLsnap.h's IComponentImpl implementation of this
  65. // in order to correctly handle messages which it is incorrectly
  66. // ignoring (e.g. MMCN_COLUMN_CLICK and MMCN_SNAPINHELP)
  67. STDMETHOD(Notify)(
  68. LPDATAOBJECT lpDataObject
  69. , MMC_NOTIFY_TYPE event
  70. , LPARAM arg
  71. , LPARAM param
  72. );
  73. STDMETHOD(CompareObjects)(
  74. LPDATAOBJECT lpDataObjectA
  75. , LPDATAOBJECT lpDataObjectB
  76. );
  77. // IResultDataCompare
  78. STDMETHOD(Compare)(LPARAM lUserParam,
  79. MMC_COOKIE cookieA,
  80. MMC_COOKIE cookieB,
  81. int *pnResult);
  82. CSnapInItem * m_pSelectedNode;
  83. protected:
  84. virtual HRESULT OnColumnClick(
  85. LPARAM arg
  86. , LPARAM param
  87. );
  88. virtual HRESULT OnViewChange(
  89. LPARAM arg
  90. , LPARAM param
  91. );
  92. virtual HRESULT OnPropertyChange(
  93. LPARAM arg
  94. , LPARAM param
  95. );
  96. virtual HRESULT OnAddImages(
  97. LPARAM arg
  98. , LPARAM param
  99. );
  100. // html help
  101. HRESULT OnResultContextHelp(LPDATAOBJECT lpDataObject);
  102. HBITMAP m_hBitmap16;
  103. HBITMAP m_hBitmap32;
  104. };
  105. #endif // _LOG_COMPONENT_H_