Reputation: 1133
As part of a built in tutorial system for my software I would like to programatically open the window menus of the software and show the user where to find certain functions. I've searched the Win32 API and can't find what I'm looking for. Is this possible via the API or do I need to provide some kind of workaround?
Upvotes: 0
Views: 911
Reputation: 1917
The submenu items of menubar or any other submenu (popu menu) can be displayed with TrackPopupMenu(Ex) API function. This function needs the menu handle of the submenu and coordinates at which to display it. For instance in order to display the File menu of menubar the following actions should be taken: Get File submenu handle with GetSubMenu(0); Get File menu item rectangle using GetMenuItemRect; calculate the desired coordinates using the rectangle; TrackPopupMenu(Ex) to display the menu.
Upvotes: 1