You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Announcement
Collapse
No announcement yet.
GetMenuItemInfo() - obtain caption without parenthandle
You say have a handle to the menu and you want info about an item on that menu. Is that correct?
If you want info about an item on that menu, you must know which item, which means you must know either which index or which command ID....meaning GetMenuItemInfo() should be perfect.
Or, If you don't know which item you want, you can enumerate all indices of the menu from zero to GetMenuItemCount(hMenu) - 1 and use GetMenuItemInfo() against each.
If you want to get info about a menu, you have to have a handle, period. Otherwise how can Windows know in which menu currently active on the system you are interested?
I said popuphandle.
Iow: hSubMenu = GetSubMenu( hMenu, 0 )
Now forget i knew hMenu and only have: hSubMenu
I have been busy with menu's today and it seems i always need to know the parent handle and index (thus hMenu in this example)
The menuitem info is obtained via the parentitem + index or id
This is the main difference to other collections where the item itself has an id/handle.
The menu functions are not prepared to do so, that is what i wanted confirmation about.
No big deal anymore anyway.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment