Might seem unusual, but I have a use for it if it can be done. I have a menu with a bunch of popups that each have one or two options. I'd like to indicate which POPUP has an item checked, since only 1 from the whole list can be.
Might seem unusual, but I have a use for it if it can be done. I have a menu with a bunch of popups that each have one or two options. I'd like to indicate which POPUP has an item checked, since only 1 from the whole list can be.
I did try defaulting 1 to checked in the resource file and it wouldn't compile. That's why I was asking. Thought maybe POPUPs require different handling to do the same thing.
If you where really persistent you could always try to edit the raw menu resource file to include a check on a popup, I recently cracked it, so I could show you if you want.
What exactly is the issue?
I use GetMenuItemInfo() and SetMenuItemInfo().
I find BY_POSITION harder to use than the items ID (as it counts down then across).
Make sure your handler unchecks all menu items then checks the right menu item.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
Far as I can tell, you can't even asign an ID to a popup. Take PS1 below, for example.
Code:ELF_MENU MENU BEGIN POPUP "Mode" BEGIN POPUP "PS1" BEGIN MENUITEM "ELF",MNU_PS1_ELF,GRAYED MENUITEM "RAM",MNU_PS1_RAW END POPUP "PS2" BEGIN MENUITEM "ELF",MNU_PS2_ELF MENUITEM "RAM",MNU_PS2_RAW END
You could use some other method for indicating it. Like putting brackets around the popup's caption or some other trick on the string.
Popups can be given IDs.
TrackPopupMenuEx() can be asked to return the ID.
Code:IDR_MENU1 MENU BEGIN POPUP "" BEGIN MENUITEM "&Some Menu Item", IDM_SOMEMENUITEM END END
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill