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.

88 lines
1.9 KiB

  1. //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
  2. //
  3. // chanmenu.h
  4. //
  5. // Conext menu interface for items.
  6. //
  7. // History:
  8. //
  9. // 3/26/97 edwardp Created.
  10. //
  11. ////////////////////////////////////////////////////////////////////////////////
  12. //
  13. // Check for previous includes of this file.
  14. //
  15. #ifndef _CHANMENU_H_
  16. #define _CHANMENU_H_
  17. //
  18. // Class definition for the item context menu class.
  19. //
  20. class CChannelMenu : public IContextMenu,
  21. public IShellExtInit
  22. {
  23. //
  24. // Methods
  25. //
  26. public:
  27. // Constructor
  28. CChannelMenu(void);
  29. // IUnknown
  30. STDMETHODIMP QueryInterface(REFIID, void **);
  31. STDMETHODIMP_(ULONG) AddRef(void);
  32. STDMETHODIMP_(ULONG) Release(void);
  33. // IContextMenu methods.
  34. STDMETHODIMP QueryContextMenu(HMENU hmenu,
  35. UINT indexMenu,
  36. UINT idCmdFirst,
  37. UINT idCmdLast,
  38. UINT uFlags);
  39. STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpici);
  40. STDMETHODIMP GetCommandString(UINT_PTR idCommand,
  41. UINT uFLags,
  42. UINT *pwReserved,
  43. LPSTR pszName,
  44. UINT cchMax);
  45. // ISHelExtInit
  46. STDMETHODIMP Initialize(LPCITEMIDLIST pidl, LPDATAOBJECT pdobj, HKEY hkey);
  47. private:
  48. // Destructor.
  49. ~CChannelMenu(void);
  50. // Helper functions.
  51. void RemoveMenuItems(HMENU hmenu);
  52. void Refresh(HWND hwnd);
  53. void ViewSource(HWND hwnd);
  54. HRESULT Subscribe(HWND hwnd);
  55. //
  56. // Member variables.
  57. //
  58. private:
  59. ULONG m_cRef;
  60. ISubscriptionMgr* m_pSubscriptionMgr;
  61. BSTR m_bstrURL;
  62. BSTR m_bstrName;
  63. TCHAR m_szPath[MAX_PATH];
  64. TASK_TRIGGER m_tt;
  65. SUBSCRIPTIONINFO m_si;
  66. };
  67. #endif // _CHANMENU_H_