comparison kdiff3/src/kreplacements/ShellContextMenu.h @ 69:8febbfb1148c

KDiff3 0.9.89
author joachim99
date Mon, 10 Apr 2006 08:40:51 +0000
parents
children 5bbfe4784324 1184fc843210
comparison
equal deleted inserted replaced
68:d7cafcda8c99 69:8febbfb1148c
1 // ShellContextMenu.h: Schnittstelle für die Klasse CShellContextMenu.
2 //
3 //////////////////////////////////////////////////////////////////////
4
5 #ifndef SHELLCONTEXTMENU_H
6 #define SHELLCONTEXTMENU_H
7
8 /////////////////////////////////////////////////////////////////////
9 // class to show shell contextmenu of files/folders/shell objects
10 // developed by R. Engels 2003
11 /////////////////////////////////////////////////////////////////////
12
13 class CShellContextMenu
14 {
15 public:
16 HMENU GetMenu ();
17 void SetObjects (IShellFolder * psfFolder, LPITEMIDLIST pidlItem);
18 void SetObjects (IShellFolder * psfFolder, LPITEMIDLIST * pidlArray, int nItemCount);
19 void SetObjects (LPITEMIDLIST pidl);
20 void SetObjects (const QString& strObject);
21 void SetObjects (const QStringList& strList);
22 UINT ShowContextMenu (QWidget* pParent, QPoint pt, QPopupMenu* pMenu);
23 CShellContextMenu();
24 virtual ~CShellContextMenu();
25
26 private:
27 int nItems;
28 BOOL bDelete;
29 HMENU m_hMenu;
30 IShellFolder * m_psfFolder;
31 LPITEMIDLIST * m_pidlArray;
32
33 void InvokeCommand (LPCONTEXTMENU pContextMenu, UINT idCommand);
34 BOOL GetContextMenu (void ** ppContextMenu, int & iMenuType);
35 HRESULT SHBindToParentEx (LPCITEMIDLIST pidl, REFIID riid, VOID **ppv, LPCITEMIDLIST *ppidlLast);
36 static LRESULT CALLBACK HookWndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
37 void FreePIDLArray (LPITEMIDLIST * pidlArray);
38 LPITEMIDLIST CopyPIDL (LPCITEMIDLIST pidl, int cb = -1);
39 UINT GetPIDLSize (LPCITEMIDLIST pidl);
40 LPBYTE GetPIDLPos (LPCITEMIDLIST pidl, int nPos);
41 int GetPIDLCount (LPCITEMIDLIST pidl);
42 };
43
44 #endif