mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 05:43:30 +00:00
9fa710c813
svn path=/branches/GSoC_2011/ThemesSupport/; revision=52643
65 lines
2.2 KiB
C++
65 lines
2.2 KiB
C++
/*
|
|
* Open With Context Menu extension
|
|
*
|
|
* Copyright 2007 Johannes Anderwald <janderwald@reactos.org>
|
|
* Copyright 2009 Andrew Hill
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
*/
|
|
|
|
#ifndef _SHE_OCMENU_H_
|
|
#define _SHE_OCMENU_H_
|
|
|
|
class COpenWithMenu :
|
|
public CComCoClass<COpenWithMenu, &CLSID_OpenWithMenu>,
|
|
public CComObjectRootEx<CComMultiThreadModelNoCS>,
|
|
public IContextMenu2,
|
|
public IShellExtInit
|
|
{
|
|
private:
|
|
LONG wId;
|
|
BOOL NoOpen;
|
|
UINT count;
|
|
WCHAR szPath[MAX_PATH];
|
|
HMENU hSubMenu;
|
|
public:
|
|
COpenWithMenu();
|
|
~COpenWithMenu();
|
|
HRESULT SHEOW_LoadOpenWithItems(IDataObject *pdtobj);
|
|
|
|
// IContextMenu
|
|
virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
|
|
virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi);
|
|
virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand,UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen);
|
|
|
|
// IContextMenu2
|
|
virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
// IShellExtInit
|
|
virtual HRESULT STDMETHODCALLTYPE Initialize(LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID);
|
|
|
|
DECLARE_NO_REGISTRY()
|
|
DECLARE_NOT_AGGREGATABLE(COpenWithMenu)
|
|
|
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
|
|
|
BEGIN_COM_MAP(COpenWithMenu)
|
|
COM_INTERFACE_ENTRY_IID(IID_IContextMenu2, IContextMenu2)
|
|
COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu)
|
|
COM_INTERFACE_ENTRY_IID(IID_IShellExtInit, IShellExtInit)
|
|
END_COM_MAP()
|
|
};
|
|
|
|
#endif // _SHE_OCMENU_H_
|