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.

92 lines
3.5 KiB

  1. //==============================================================;
  2. //
  3. // This source code is only intended as a supplement to
  4. // existing Microsoft documentation.
  5. //
  6. //
  7. //
  8. //
  9. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  10. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  11. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  12. // PURPOSE.
  13. //
  14. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  15. //
  16. //
  17. //
  18. //==============================================================;
  19. #ifndef _BRANCHES_H
  20. #define _BRANCHES_H
  21. #include <mmc.h>
  22. #include <crtdbg.h>
  23. #include "globals.h"
  24. #include "resource.h"
  25. #include "LocalRes.h"
  26. class CComponent;
  27. class CComponentData;
  28. class CDelegationBase {
  29. public:
  30. CDelegationBase();
  31. virtual ~CDelegationBase();
  32. virtual const _TCHAR *GetDisplayName(int nCol = 0) = 0;
  33. virtual const GUID & getNodeType() { _ASSERT(FALSE); return IID_NULL; }
  34. virtual const LPARAM GetCookie() { return reinterpret_cast<LPARAM>(this); }
  35. virtual const int GetBitmapIndex() = 0;
  36. virtual HRESULT GetResultViewType(LPOLESTR *ppViewType, long *pViewOptions) { return S_FALSE; }
  37. virtual void SetScopeItemValue(HSCOPEITEM hscopeitem) { _ASSERT(FALSE); }
  38. virtual HSCOPEITEM GetParentScopeItem() { _ASSERT(FALSE); return 0;}
  39. public:
  40. // virtual functions go here (for MMCN_*)
  41. virtual HRESULT OnExpand(IConsoleNameSpace *pConsoleNameSpace, IConsole *pConsole, HSCOPEITEM parent) { return S_FALSE; }
  42. virtual HRESULT OnShow(IConsole *pConsole, BOOL bShow, HSCOPEITEM scopeitem) { return S_FALSE; }
  43. virtual HRESULT OnAddImages(IImageList *pImageList, HSCOPEITEM hsi);
  44. virtual HRESULT OnRename(LPOLESTR pszNewName) { return S_FALSE; }
  45. virtual HRESULT OnSelect(CComponent *pComponent, IConsole *pConsole, BOOL bScope, BOOL bSelect) { return S_FALSE; }
  46. virtual HRESULT OnUpdateItem(IConsole *pConsole, long item, ITEM_TYPE itemtype) { return S_FALSE; }
  47. virtual HRESULT OnRefresh(IConsole *pConsole) { return S_FALSE; }
  48. virtual HRESULT OnDelete(IConsole *pConsoleComp) { return S_FALSE; }
  49. virtual HRESULT CreatePropertyPages(IPropertySheetCallback *lpProvider,
  50. LONG_PTR handle) { return S_FALSE; }
  51. virtual HRESULT HasPropertySheets() { return S_FALSE; }
  52. virtual HRESULT GetWatermarks(HBITMAP *lphWatermark,
  53. HBITMAP *lphHeader,
  54. HPALETTE *lphPalette,
  55. BOOL *bStretch) { return S_FALSE; }
  56. virtual HRESULT OnPropertyChange(IConsole *pConsole, CComponent *pComponent) { return S_OK; }
  57. virtual HRESULT OnAddMenuItems(IContextMenuCallback *pContextMenuCallback, long *pInsertionsAllowed) { return S_FALSE; }
  58. virtual HRESULT OnMenuCommand(IConsole *pConsole, IConsoleNameSpace *pConsoleNameSpace, long lCommandID, IDataObject *piDataObject) { return S_FALSE; }
  59. virtual HRESULT OnToolbarCommand(IConsole *pConsole, MMC_CONSOLE_VERB verb, IDataObject *pDataObject) { return S_FALSE; }
  60. virtual HRESULT OnSetToolbar(IControlbar *pControlbar, IToolbar *pToolbar, BOOL bScope, BOOL bSelect) { return S_FALSE; }
  61. public:
  62. static HBITMAP m_pBMapSm;
  63. static HBITMAP m_pBMapLg;
  64. protected:
  65. static void LoadBitmaps() {
  66. m_pBMapSm = LoadBitmap(g_hinst, MAKEINTRESOURCE(IDR_SMICONS));
  67. m_pBMapLg = LoadBitmap(g_hinst, MAKEINTRESOURCE(IDR_LGICONS));
  68. }
  69. BOOL bExpanded;
  70. private:
  71. // {786C6F77-6BE7-11d3-9156-00C04F65B3F9}
  72. static const GUID thisGuid;
  73. };
  74. #endif // _BRANCHES_H