PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/win32/shellext/CShellExtCMenu.h

https://bitbucket.org/tortoisehg/hgtk/
C++ Header | 45 lines | 31 code | 11 blank | 3 comment | 0 complexity | 9fde459d5f6bc107c195aeb7d22359df MD5 | raw file
 1#ifndef _CShellExtCMenu_h_
 2#define _CShellExtCMenu_h_
 3
 4#include <vector>
 5#include <string>
 6
 7
 8class CShellExtCMenu: public IContextMenu3, IShellExtInit
 9{
10    ULONG m_cRef;
11
12    LPTSTR* m_ppszFileUserClickedOn; // [MAX_PATH]
13    std::vector<std::string> myFiles;
14    std::string myFolder;
15
16    void RunDialog(const std::string&);
17
18public:
19    explicit CShellExtCMenu(char dummy);
20    ~CShellExtCMenu();
21
22    // IUnknown
23    STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR *ppv);
24    STDMETHODIMP_(ULONG) AddRef();
25    STDMETHODIMP_(ULONG) Release();
26
27    // IContextMenu3
28    STDMETHODIMP QueryContextMenu(
29        HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast,
30        UINT uFlags);
31    STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi);
32    STDMETHODIMP GetCommandString(
33        UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved,LPSTR pszName,
34        UINT cchMax);
35    STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
36    STDMETHODIMP HandleMenuMsg2(
37        UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
38
39    // IShellExtInit
40    STDMETHODIMP Initialize(
41        LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID);
42};
43
44
45#endif