GetMenuInfo

Windows specific forum
Psych
Enthusiast
Enthusiast
Posts: 239
Joined: Thu Dec 18, 2008 3:35 pm
Location: Wales, UK

GetMenuInfo

Post by Psych »

I've been pulling my hair out for whole day thinking that my coding was wrong, only to find that GetMenuInfo does not work properly with image menus. As far as I am aware it is only the ability to get the menu text that fails, Getmenustring also fails with Image menus.

Does anyone know why this is? Or if there is a workaround?
----------------------------------------------------------------------------
Commenting your own code is admitting you don't understand it.
----------------------------------------------------------------------------
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: GetMenuInfo

Post by IdeasVacuum »

As far as I am aware it is only the ability to get the menu text that fails, Getmenustring also fails with Image menus.
Erm, that's two items that fail then.

I couldn't find anything on MSDN that suggests GetMenuInfo will not work with a menu that includes bitmaps. What info are you trying to gather? Do the PB commands GetMenuItemText() and GetMenuTitleText() work with your menu?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Psych
Enthusiast
Enthusiast
Posts: 239
Joined: Thu Dec 18, 2008 3:35 pm
Location: Wales, UK

Re: GetMenuInfo

Post by Psych »

Indeed, but I was kinda assuming that the one function was a wrapper for the second, with more information. MSDN does encourage the use of getmenuinfo over other functions anyway.

I havent used the PB functions, since I want to be able to modify menu items and submenus on the fly, something PB doesnt support. With the API I can add a submenu to another menu with very little programming, I am just a little bewildered why the text member doesnt populate with image menus.
----------------------------------------------------------------------------
Commenting your own code is admitting you don't understand it.
----------------------------------------------------------------------------
Post Reply