Source code of Windows XP (NT5)
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.

71 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000.
  5. //
  6. // File: U P N P T R A Y . H
  7. //
  8. // Contents: Tray code for UPnP
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 20 Jan 2000
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #ifndef _UPNPTRAY_H_
  17. #define _UPNPTRAY_H_
  18. #include "ncbase.h"
  19. #include "upsres.h"
  20. //---[ UPnP Tray Classes ]----------------------------------------------
  21. class ATL_NO_VTABLE CUPnPTray :
  22. public CComObjectRootEx <CComMultiThreadModel>,
  23. public CComCoClass <CUPnPTray, &CLSID_UPnPMonitor>,
  24. public IOleCommandTarget
  25. {
  26. private:
  27. LPITEMIDLIST m_pidl;
  28. HWND m_hwnd;
  29. public:
  30. CUPnPTray()
  31. {
  32. m_pidl = NULL;
  33. m_hwnd = NULL;
  34. }
  35. DECLARE_REGISTRY_RESOURCEID(IDR_UPNPTRAY)
  36. DECLARE_NOT_AGGREGATABLE(CUPnPTray)
  37. BEGIN_COM_MAP(CUPnPTray)
  38. COM_INTERFACE_ENTRY(IOleCommandTarget)
  39. END_COM_MAP()
  40. // IOleCommandTarget members
  41. STDMETHODIMP QueryStatus(
  42. const GUID * pguidCmdGroup,
  43. ULONG cCmds,
  44. OLECMD prgCmds[],
  45. OLECMDTEXT * pCmdText);
  46. STDMETHODIMP Exec(
  47. const GUID * pguidCmdGroup,
  48. DWORD nCmdID,
  49. DWORD nCmdexecopt,
  50. VARIANTARG * pvaIn,
  51. VARIANTARG * pvaOut);
  52. // Handlers for various Exec Command IDs
  53. //
  54. HRESULT HrHandleTrayOpen();
  55. HRESULT HrHandleTrayClose();
  56. };
  57. #endif // _UPNPTRAY_H_