Jump to content
  • Advertisement
Sign in to follow this  
GuitarPlayer0912

Menu Extras in c++

This topic is 4359 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know how to add extras to menus in c++? I know the basic MENUITEM SEPARATOR, POPUP, and other stuff like that. But I would really like a check/uncheckable option (for hiding and showing windows), or even possibly an arrow that gives you more options when you hover your mouse over it. If you need an example, click File on your internet browser and there should be an arrow like the one I'm talking about show you more options. Any help would be appreciated. Thanks. Edit: I just found out that CHECKBOX is a keyword, but I don't know how to use it in the resource syntax.

Share this post


Link to post
Share on other sites
Advertisement
From the MENU Resource entry on MSDN:

sample MENU
{
MENUITEM "&Soup", 100
MENUITEM "S&alad", 101
POPUP "&Entree"
{
MENUITEM "&Fish", 200
MENUITEM "&Chicken", 201, CHECKED
POPUP "&Beef"
{
MENUITEM "&Steak", 301
MENUITEM "&Prime Rib", 302
}
}
MENUITEM "&Dessert", 103
}

Note the Chicken menu item.

Share this post


Link to post
Share on other sites
I tried the CHECKED thing already before and I want to know how to make it alternate between checked/unchecked when I select the option. Whenever I select a checked item, it stays checked.

Share this post


Link to post
Share on other sites
That's because you need to check/uncheck to menu item yourself when you handle the menu messages. See the CheckMenuItem() and SetMenuItemInfo() functions.

Share this post


Link to post
Share on other sites
Ok I know I'm getting annoying, but I've tried everything I can think of. Could you please post some source code showing how to toggle the checkmark on or off? Believe me, I'm not lazy, I did try.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!