Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenopenwithmenu.h
Go to the documentation of this file.
00001 /* 00002 * Open With Context Menu extension 00003 * 00004 * Copyright 2007 Johannes Anderwald <janderwald@reactos.org> 00005 * Copyright 2009 Andrew Hill 00006 * Copyright 2012 Rafal Harabien 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00021 */ 00022 00023 #ifndef _SHE_OCMENU_H_ 00024 #define _SHE_OCMENU_H_ 00025 00026 class COpenWithList; 00027 00028 class COpenWithMenu : 00029 public CComCoClass<COpenWithMenu, &CLSID_OpenWithMenu>, 00030 public CComObjectRootEx<CComMultiThreadModelNoCS>, 00031 public IContextMenu2, 00032 public IShellExtInit 00033 { 00034 private: 00035 UINT m_idCmdFirst, m_idCmdLast; 00036 WCHAR m_wszPath[MAX_PATH]; 00037 HMENU m_hSubMenu; 00038 COpenWithList *m_pAppList; 00039 00040 HBITMAP IconToBitmap(HICON hIcon); 00041 VOID AddChooseProgramItem(); 00042 VOID AddApp(PVOID pApp); 00043 00044 public: 00045 COpenWithMenu(); 00046 ~COpenWithMenu(); 00047 00048 // IContextMenu 00049 virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); 00050 virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); 00051 virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); 00052 00053 // IContextMenu2 00054 virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); 00055 00056 // IShellExtInit 00057 virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); 00058 00059 DECLARE_REGISTRY_RESOURCEID(IDR_OPENWITHMENU) 00060 DECLARE_NOT_AGGREGATABLE(COpenWithMenu) 00061 00062 DECLARE_PROTECT_FINAL_CONSTRUCT() 00063 00064 BEGIN_COM_MAP(COpenWithMenu) 00065 COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2) 00066 COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) 00067 COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit) 00068 END_COM_MAP() 00069 }; 00070 00071 #endif // _SHE_OCMENU_H_ Generated on Fri May 25 2012 04:24:32 for ReactOS by
1.7.6.1
|