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.

89 lines
2.5 KiB

  1. // qryitem.h - header file for CQueryItem class
  2. #ifndef _QRYITEM_H_
  3. #define _QRYITEM_H_
  4. #include "scopenode.h"
  5. #include "rowitem.h"
  6. #include "adext.h"
  7. //------------------------------------------------------------------
  8. // class CQueryItem
  9. //------------------------------------------------------------------
  10. class CQueryItem :
  11. public CComObjectRootEx<CComSingleThreadModel>,
  12. public CDataObjectImpl
  13. {
  14. public:
  15. CQueryItem() : m_pRowItem(NULL), m_pADExt(NULL), m_spQueryNode(NULL) {}
  16. virtual ~CQueryItem()
  17. {
  18. SAFE_DELETE(m_pRowItem);
  19. SAFE_DELETE(m_pADExt);
  20. }
  21. HRESULT Initialize(CQueryableNode* pQueryNode, CRowItem* pRowItem);
  22. DECLARE_NOT_AGGREGATABLE(CQueryItem)
  23. BEGIN_COM_MAP(CQueryItem)
  24. COM_INTERFACE_ENTRY(IDataObject)
  25. COM_INTERFACE_ENTRY(IBOMObject)
  26. END_COM_MAP()
  27. //
  28. // Notification handlers
  29. //
  30. DECLARE_NOTIFY_MAP()
  31. STDMETHOD(OnHelp) (LPCONSOLE2 pConsole, LPARAM arg, LPARAM param);
  32. STDMETHOD(OnSelect)(LPCONSOLE2 pConsole, BOOL bSelect, BOOL bScope);
  33. STDMETHOD(OnDblClick)(LPCONSOLE2 pConsole);
  34. //
  35. // IDataObject helper method
  36. //
  37. STDMETHOD(GetDataImpl)(UINT cf, HGLOBAL* hGlobal);
  38. //
  39. // IBOMObject methods
  40. //
  41. STDMETHOD(AddMenuItems)(LPCONTEXTMENUCALLBACK pCallback, long* lAllowed);
  42. STDMETHOD(MenuCommand)(LPCONSOLE2 pConsole, long lCommand);
  43. STDMETHOD(SetToolButtons)(LPTOOLBAR pToolbar)
  44. { return S_FALSE; }
  45. STDMETHOD(SetVerbs)(LPCONSOLEVERB pConsVerb)
  46. { return S_OK; }
  47. STDMETHOD(QueryPagesFor)();
  48. STDMETHOD(CreatePropertyPages)(LPPROPERTYSHEETCALLBACK lpProvider,LONG_PTR handle)
  49. { return E_UNEXPECTED; }
  50. STDMETHOD(GetWatermarks)(HBITMAP* lphWatermark, HBITMAP* lphHeader, HPALETTE* lphPalette, BOOL* bStretch)
  51. { return E_UNEXPECTED; }
  52. //
  53. // Member variables
  54. //
  55. CQueryableNode* m_spQueryNode; // Query node that owns this item
  56. CRowItem* m_pRowItem; // Row item info for this item
  57. CActDirExt* m_pADExt; // Directory extension (handles AD menus and prop pages)
  58. menucmd_vector m_vMenus; // Menu items defined for the query node
  59. static UINT m_cfDisplayName; // supported clipboard formats
  60. static UINT m_cfSnapInClsid;
  61. static UINT m_cfNodeType;
  62. static UINT m_cfszNodeType;
  63. };
  64. typedef CComPtr<CQueryItem> CQueryItemPtr;
  65. #endif // _QRYITEM_H_