G
Guest
I need to perform some special initialization of a menu when it is displayed, so I am looking for the WM_INITMENUPOPUP so that I can modify my menu before it appears. Unfortunately WM_INITMENUPOPUP doesn't provide the most basic information that you would need with this function - the menu being displayed! For example, assume I have an app with these menus: File, Edit, and Help and you trap the WM_INITMENUPOPUP message and pull out the handle to the menu being displayed. Can anyone tell me which menu it is? Is it the File menu, the Edit menu, or the Help menu? From what I can tell, it's impossible to get this information because the base item of a popup menus cannot be assigned an ID! From what I can tell, I can do nothing more than make an educated guess on the menu being displayed by looking at its position or looking at the IDs of menu commands within the menu (assuming of course that the menu contains something other than more submenu nodes and that translators handling the localized versions of a resource DLL did not modify the menus or their positions to make better sense in other locales) I've got to be missing something here because this is such a huge gaping hole in the menu API that it would have been fixed before Windows 95 was released
What is the trick to determing which menu was popped up?
What is the trick to determing which menu was popped up?