Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9.1, 0.9.1.1, and 0.9.2

stable shellext: move class CShellExtCMenu into new file CShellExtCMenu.h

Changeset 30e68ed3f3b3

Parent 5bc26a9988ab

by Adrian Buehlmann

Changes to 4 files · Browse files at 30e68ed3f3b3 Showing diff from parent 5bc26a9988ab Diff from another changeset...

Change 1 of 1 Show Entire File win32/​shellext/​CShellExtCMenu.h Stacked
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@@ -0,0 +1,45 @@
+#ifndef _CShellExtCMenu_h_ +#define _CShellExtCMenu_h_ + +#include <vector> +#include <string> + + +class CShellExtCMenu: public IContextMenu3, IShellExtInit +{ + ULONG m_cRef; + + LPTSTR* m_ppszFileUserClickedOn; // [MAX_PATH] + std::vector<std::string> myFiles; + std::string myFolder; + + void DoHgtk(const std::string&); + +public: + explicit CShellExtCMenu(char dummy); + ~CShellExtCMenu(); + + // IUnknown + STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR *ppv); + STDMETHODIMP_(ULONG) AddRef(); + STDMETHODIMP_(ULONG) Release(); + + // IContextMenu3 + STDMETHODIMP QueryContextMenu( + HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, + UINT uFlags); + STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); + STDMETHODIMP GetCommandString( + UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved,LPSTR pszName, + UINT cchMax); + STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHODIMP HandleMenuMsg2( + UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* pResult); + + // IShellExtInit + STDMETHODIMP Initialize( + LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID); +}; + + +#endif
 
1
2
 
3
4
5
 
1
 
2
3
4
5
@@ -1,5 +1,5 @@
 #include "stdafx.h" -#include "ShellExt.h" +#include "CShellExtCMenu.h"  #include "TortoiseUtils.h"  #include "StringUtils.h"  #include "Dirstatecache.h"
 
4
5
6
 
7
8
9
 
4
5
6
7
8
9
10
@@ -4,6 +4,7 @@
 #include "StringUtils.h"  #include "InitStatus.h"  #include "ThgClassFactory.h" +#include "CShellExtCMenu.h"    #include <olectl.h>  
 
1
2
3
4
5
6
7
8
9
 
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
 
1
2
3
 
 
 
4
5
6
 
11
12
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
15
16
@@ -1,9 +1,6 @@
 #ifndef _SHELL_EXT_H_  #define _SHELL_EXT_H_   -#include <vector> -#include <string> -    class CShellExt  { @@ -14,43 +11,6 @@
 };     -class CShellExtCMenu: public IContextMenu3, IShellExtInit -{ - ULONG m_cRef; - - LPTSTR* m_ppszFileUserClickedOn; // [MAX_PATH] - std::vector<std::string> myFiles; - std::string myFolder; - - void DoHgtk(const std::string&); - -public: - explicit CShellExtCMenu(char dummy); - ~CShellExtCMenu(); - - // IUnknown - STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR *ppv); - STDMETHODIMP_(ULONG) AddRef(); - STDMETHODIMP_(ULONG) Release(); - - // IContextMenu3 - STDMETHODIMP QueryContextMenu( - HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, - UINT uFlags); - STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - STDMETHODIMP GetCommandString( - UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved,LPSTR pszName, - UINT cchMax); - STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); - STDMETHODIMP HandleMenuMsg2( - UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* pResult); - - // IShellExtInit - STDMETHODIMP Initialize( - LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID); -}; - -  class CShellExtOverlay: public IShellIconOverlayIdentifier  {   ULONG m_cRef;