00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef HOSTCONTEXTMENU_H
00021 #define HOSTCONTEXTMENU_H
00022
00023 #if _MSC_VER > 1000
00024 #pragma once
00025 #endif // _MSC_VER > 1000
00026
00027 #include "stdafx.h"
00028 #include "resource.h"
00029
00030
00031 [
00032 object,
00033 uuid("b816a83f-5022-11dc-9153-0090f5284f85"),
00034 helpstring("IHostContextMenu Interface"),
00035 pointer_default(unique)
00036 ]
00037 __interface IHostContextMenu : IUnknown
00038 {
00039 };
00040
00041
00042
00043 [
00044 coclass,
00045 default(IHostContextMenu),
00046 threading(apartment),
00047 vi_progid("Swish.HostContextMenu"),
00048 progid("Swish.HostContextMenu.1"),
00049 version(1.0),
00050 uuid("b816a840-5022-11dc-9153-0090f5284f85"),
00051 helpstring("HostContextMenu Class")
00052 ]
00053 class ATL_NO_VTABLE CHostContextMenu :
00054 public IHostContextMenu,
00055 public IContextMenu
00056 {
00057 public:
00058 CHostContextMenu()
00059 {
00060 }
00061
00062 DECLARE_PROTECT_FINAL_CONSTRUCT()
00063 HRESULT FinalConstruct()
00064 {
00065 return S_OK;
00066 }
00067 void FinalRelease()
00068 {
00069 }
00070
00071 STDMETHOD(Initialize) ( PCIDLIST_ABSOLUTE pidl );
00072
00073
00074 IFACEMETHODIMP QueryContextMenu( HMENU hmenu, UINT indexMenu,
00075 UINT idCmdFirst, UINT idCmdLast,
00076 UINT uFlags );
00077 IFACEMETHODIMP InvokeCommand( CMINVOKECOMMANDINFO *pici );
00078 IFACEMETHODIMP GetCommandString( UINT_PTR idCmd, UINT uType,
00079 UINT *pReserved, LPSTR pszName,
00080 UINT cchMax );
00081
00082 private:
00083
00084 enum MENUOFFSET
00085 {
00086 MENUOFFSET_NULL = 0,
00087 MENUOFFSET_FIRST = 1,
00088 MENUOFFSET_CONNECT = MENUOFFSET_FIRST,
00089 MENUOFFSET_LAST = MENUOFFSET_CONNECT
00090 };
00091
00092
00093
00094 PIDLIST_ABSOLUTE m_pidl;
00095 };
00096
00097 #endif // HOSTCONTEXTMENU_H