Valhalla Legends Forums Archive | General Programming | [Win32] Finding the active PopupMenu

AuthorMessageTime
CupHead
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.
December 13, 2003, 2:36 AM
Skywing
I don't think the window handle for the menu will be the same thing as the menu handle.
December 13, 2003, 5:50 AM

Search