Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
544 views
in Technique[技术] by (71.8m points)

c++ - How to show Windows Explorer context (right click) menu?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

A Raymond Chen blog series "How to host an IContextMenu"

And some non-C++ samples also:

And related SO questions:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...