Valhalla Legends Archive

Programming => General Programming => Topic started by: CupHead on December 12, 2003, 08:36 PM

Title: [Win32] Finding the active PopupMenu
Post by: CupHead on December 12, 2003, 08:36 PM
I'm interested in getting the active popup menu (Created by TrackPopupMenu) and its items and then handling them as normal menu items.  At the moment, I have a timer that calls FindWindow in order to come back with the handle to the menu if it's popped up.  Sometimes this returns, but there are never any items in the menu, so I must be doing something wrong.  If anyone has ideas or better solutions, let me know.

Also:
(When applied to the popup window's handle.)
GetSubMenu returns 0.
GetMenuItemCount returns -1.

Edit: Fixed GetMenuItemCount's return value.
Title: Re:[Win32] Finding the active PopupMenu
Post by: Skywing on December 12, 2003, 11:50 PM
I don't think the window handle for the menu will be the same thing as the menu handle.