How to show Windows Explorer context (right click) menu?
c++, windows, windows-explorer
Solution
I found several samples that may help you. You're not likely to be able to do this with Qt alone, since the shell context menu is highly OS-specific; probably some Win32 calls will be needed also.
- Use Shell ContextMenu in your applications
- Explorer Shell Context Menu
A Raymond Chen blog series "How to host an IContextMenu"
And some non-C++ samples also:
- C# File Browser
- Shell context menu sample in C#
And related SO questions:
- How to access Windows shell context menu items?
- How to obtain full shell context menu of right-click a folder background
Problem
I want to show the Windows Explorer context menu. I don't want to add my application to it, I just want to display it inside my application. A good example of the implementation that I need is Total Commander. If you press and hold right mouse button, TC will show the context menu, which is exactly the same as in Windows explorer. I'm using C++/Qt, but language is not important here.