Problem solve Get help with specific problems with your technologies, process and projects.

How do I add a menu item to the system popup menu?

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

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.