comparison kdiff3/src-QT4/kreplacements/ShellContextMenu.h @ 75:08ea9b86c12c

KDiff3-0.9.91
author joachim99
date Sat, 04 Nov 2006 00:05:00 +0000
parents kdiff3/src/kreplacements/ShellContextMenu.h@5bbfe4784324
children 1184fc843210
comparison
equal deleted inserted replaced
74:069521efec1a 75:08ea9b86c12c
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, QMenu* 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