/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. #include <vector>
  4. #include <string>
  5. class CShellExtCMenu: public IContextMenu3, IShellExtInit
  6. {
  7. ULONG m_cRef;
  8. LPTSTR* m_ppszFileUserClickedOn; // [MAX_PATH]
  9. std::vector<std::string> myFiles;
  10. std::string myFolder;
  11. void RunDialog(const std::string&);
  12. public:
  13. explicit CShellExtCMenu(char dummy);
  14. ~CShellExtCMenu();
  15. // IUnknown
  16. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR *ppv);
  17. STDMETHODIMP_(ULONG) AddRef();
  18. STDMETHODIMP_(ULONG) Release();
  19. // IContextMenu3
  20. STDMETHODIMP QueryContextMenu(
  21. HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast,
  22. UINT uFlags);
  23. STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi);
  24. STDMETHODIMP GetCommandString(
  25. UINT_PTR idCmd, UINT uFlags, UINT FAR* reserved,LPSTR pszName,
  26. UINT cchMax);
  27. STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
  28. STDMETHODIMP HandleMenuMsg2(
  29. UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  30. // IShellExtInit
  31. STDMETHODIMP Initialize(
  32. LPCITEMIDLIST pIDFolder, LPDATAOBJECT pDataObj, HKEY hKeyID);
  33. };
  34. #endif