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.

77 lines
2.6 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 CDelegationBase {
  27. public:
  28. CDelegationBase();
  29. virtual ~CDelegationBase();
  30. virtual const _TCHAR *GetDisplayName(int nCol = 0) = 0;
  31. virtual const GUID & getNodeType() { _ASSERT(FALSE); return IID_NULL; }
  32. virtual const LPARAM GetCookie() { return reinterpret_cast<LPARAM>(this); }
  33. virtual const int GetBitmapIndex() = 0;
  34. virtual const HANDLE GetHandle() { return m_handle; }
  35. virtual SetHandle(HANDLE handle) { m_handle = handle; }
  36. virtual HRESULT GetResultViewType(LPOLESTR *ppViewType, long *pViewOptions) { return S_FALSE; }
  37. public:
  38. // virtual functions go here (for MMCN_*)
  39. virtual HRESULT OnExpand(IConsoleNameSpace *pConsoleNameSpace, IConsole *pConsole, HSCOPEITEM parent) { return S_FALSE; }
  40. virtual HRESULT OnShow(IConsole *pConsole, BOOL bShow, HSCOPEITEM scopeitem) { return S_FALSE; }
  41. virtual HRESULT OnAddImages(IImageList *pImageList, HSCOPEITEM hsi);
  42. virtual HRESULT OnRename(LPOLESTR pszNewName) { return S_FALSE; }
  43. virtual HRESULT OnSelect(IConsole *pConsole, BOOL bScope, BOOL bSelect) { return S_FALSE; }
  44. virtual HRESULT CreatePropertyPages(IPropertySheetCallback *lpProvider,
  45. LONG_PTR handle) { return S_FALSE; }
  46. virtual HRESULT HasPropertySheets() { return S_FALSE; }
  47. virtual HRESULT GetWatermarks(HBITMAP *lphWatermark,
  48. HBITMAP *lphHeader,
  49. HPALETTE *lphPalette,
  50. BOOL *bStretch) { return S_FALSE; }
  51. public:
  52. static HBITMAP m_pBMapSm;
  53. static HBITMAP m_pBMapLg;
  54. protected:
  55. static void LoadBitmaps() {
  56. m_pBMapSm = LoadBitmap(g_hinst, MAKEINTRESOURCE(IDR_SMICONS));
  57. m_pBMapLg = LoadBitmap(g_hinst, MAKEINTRESOURCE(IDR_LGICONS));
  58. }
  59. BOOL bExpanded;
  60. HANDLE m_handle;
  61. private:
  62. // {2974380B-4C4B-11d2-89D8-000021473128}
  63. static const GUID thisGuid;
  64. };
  65. #endif // _BRANCHES_H