How do I add a menu item to the system popup menu (like WinZip did with "add to zip")? I guess it depends on what...
you mean by "system popup menu!" If you are referring to the system menu (the menu in the upper left corner of a window), you can get the menu handle by calling the GetSystemMenu API function. Once you have the menu handle, you can use the rest of the normal menu functions to add your menu. Make sure to give your commands values larger than 10. You will also have to handle the WM_SYSCOMMAND messages so you can respond to the commands you added. To ensure you don't mess up the regular system menu commands, you'll need to AND the wParam value with 0xFFF0 to see if the command is one of yours.
Since your question referred to the WinZip shell extension menu, you might be confusing the system menu with the Explorer right click menu. That menu is accessed through Shell Extensions. Developing Shell Extensions is rather tricky, but my good friend Dino Esposito wrote an excellent book that shows you exactly what you need to do. Dino's book is from Wrox Press and is titled, "Visual C++ Windows Shell Programming."
Dig Deeper on Windows Server troubleshooting
Related Q&A from John Robbins
What is a JAD session? This term is referred to often in job postings and seems like some kind of brainstorm you carry out with a client to define IT... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.