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.

64 lines
2.2 KiB

  1. //==============================================================;
  2. //
  3. // This source code is only intended as a supplement to existing Microsoft documentation.
  4. //
  5. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  6. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  7. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  8. // PURPOSE.
  9. //
  10. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  11. //==============================================================;
  12. #ifndef _BRANCHES_H
  13. #define _BRANCHES_H
  14. #include <mmc.h>
  15. #include <crtdbg.h>
  16. #include "globals.h"
  17. #include "resource.h"
  18. #include "LocalRes.h"
  19. class CDelegationBase {
  20. public:
  21. CDelegationBase();
  22. virtual ~CDelegationBase();
  23. virtual const _TCHAR *GetDisplayName(int nCol = 0) = 0;
  24. virtual const GUID & getNodeType() { _ASSERT(FALSE); return IID_NULL; }
  25. virtual const LPARAM GetCookie() { return reinterpret_cast<LPARAM>(this); }
  26. virtual const int GetBitmapIndex() = 0;
  27. virtual HRESULT GetResultViewType(LPOLESTR *ppViewType, long *pViewOptions) { return S_FALSE; }
  28. public:
  29. // virtual functions go here (for MMCN_*)
  30. virtual HRESULT OnExpand(IConsoleNameSpace *pConsoleNameSpace, IConsole *pConsole, HSCOPEITEM parent) { return S_FALSE; }
  31. virtual HRESULT OnShow(IConsole *pConsole, BOOL bShow, HSCOPEITEM scopeitem) { return S_FALSE; }
  32. virtual HRESULT OnAddImages(IImageList *pImageList, HSCOPEITEM hsi);
  33. virtual HRESULT OnAddMenuItems(IContextMenuCallback *pContextMenuCallback, long *pInsertionsAllowed) { return S_FALSE; }
  34. virtual HRESULT OnMenuCommand(IConsole *pConsole, long lCommandID) { return S_FALSE; }
  35. public:
  36. static HBITMAP m_pBMapSm;
  37. static HBITMAP m_pBMapLg;
  38. _TCHAR m_szMachineName[MAX_PATH]; //Current machine name.
  39. _TCHAR* GetMachineName() { return m_szMachineName; }
  40. protected:
  41. BOOL bExpanded;
  42. static void LoadBitmaps() {
  43. m_pBMapSm = LoadBitmap(g_hinst, MAKEINTRESOURCE(IDR_SMICONS));
  44. m_pBMapLg = LoadBitmap(g_hinst, MAKEINTRESOURCE(IDR_LGICONS)); }
  45. private:
  46. // {C0F26ADE-0500-4c6c-BA07-6DBA25465522}
  47. static const GUID thisGuid;
  48. };
  49. #endif // _BRANCHES_H