1 /////////////////////////////////////////////////////////////////////////////
2 // WinMergeShell.h : declaration file
4 /////////////////////////////////////////////////////////////////////////////
6 // This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
7 // This program 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 General Public License for more details.
8 // You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
9 /////////////////////////////////////////////////////////////////////////////
10 // Look at http://www.codeproject.com/shell/ for excellent guide
11 // to Windows Shell programming by Michael Dunn.
15 #ifndef __WINMERGESHELL_H_
16 #define __WINMERGESHELL_H_
20 #include <atlconv.h> // for ATL string conversion macros
21 #include "resource.h" // main symbols
23 /////////////////////////////////////////////////////////////////////////////
25 class ATL_NO_VTABLE CWinMergeShell :
26 public CComObjectRootEx<CComSingleThreadModel>,
27 public CComCoClass<CWinMergeShell, &CLSID_WinMergeShell>,
28 public IDispatchImpl<IWinMergeShell, &IID_IWinMergeShell, &LIBID_SHELLEXTENSIONLib>,
35 DECLARE_REGISTRY_RESOURCEID(IDR_WINMERGESHELL)
37 DECLARE_PROTECT_FINAL_CONSTRUCT()
39 BEGIN_COM_MAP(CWinMergeShell)
40 COM_INTERFACE_ENTRY(IWinMergeShell)
41 COM_INTERFACE_ENTRY(IDispatch)
42 COM_INTERFACE_ENTRY(IShellExtInit)
43 COM_INTERFACE_ENTRY(IContextMenu)
48 CString m_strPaths[2];
50 UINT m_nSelectedItems;
52 BOOL GetWinMergeDir(CString &strDir);
56 STDMETHOD(Initialize)(LPCITEMIDLIST, LPDATAOBJECT, HKEY);
59 STDMETHOD(GetCommandString)(UINT, UINT, UINT*, LPSTR, UINT);
60 STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO);
61 STDMETHOD(QueryContextMenu)(HMENU, UINT, UINT, UINT, UINT);
64 #endif //__WINMERGESHELL_H_