Q

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."

This was first published in September 2001

Dig deeper on Windows Server Troubleshooting

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

Close