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
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1995.
  5. //
  6. // File: menubg.hxx
  7. //
  8. // Contents: Declaration of CSharesCMBG, implementing IContextMenu for the
  9. // background
  10. //
  11. // History: 20-Dec-95 BruceFo Created
  12. //
  13. //----------------------------------------------------------------------------
  14. #ifndef __MENUBG_HXX__
  15. #define __MENUBG_HXX__
  16. class CSharesCMBG : public IContextMenu
  17. {
  18. public:
  19. CSharesCMBG(
  20. IN HWND hwnd,
  21. IN PWSTR pszMachine,
  22. IN ULONG level
  23. )
  24. :
  25. m_ulRefs(0),
  26. m_hwnd(hwnd),
  27. m_pszMachine(pszMachine),
  28. m_level(level)
  29. {
  30. AddRef();
  31. }
  32. ~CSharesCMBG() {}
  33. //
  34. // IUnknown methods
  35. //
  36. STDMETHOD(QueryInterface)(REFIID riid, LPVOID * ppvObj);
  37. STDMETHOD_(ULONG,AddRef)();
  38. STDMETHOD_(ULONG,Release)();
  39. //
  40. // IContextMenu methods
  41. //
  42. STDMETHOD(QueryContextMenu)(
  43. HMENU hmenu,
  44. UINT indexMenu,
  45. UINT idCmdFirst,
  46. UINT idCmdLast,
  47. UINT uFlags
  48. );
  49. STDMETHOD(InvokeCommand)(
  50. LPCMINVOKECOMMANDINFO lpici
  51. );
  52. STDMETHOD(GetCommandString)(
  53. UINT_PTR idCmd,
  54. UINT uType,
  55. UINT * pwReserved,
  56. LPSTR pszName,
  57. UINT cchMax
  58. );
  59. private:
  60. HWND m_hwnd;
  61. PWSTR m_pszMachine;
  62. ULONG m_level;
  63. ULONG m_ulRefs;
  64. };
  65. #endif // __MENUBG_HXX__