Ask the Expert

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")?

    Requires Free Membership to View

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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: