47.1.7 Menu Display

After a menu has been loaded or created, it must be assigned to a window before Windows can display it. You can assign a menu to a window by creating a class menu (see Section 0.1.3, “Class Menus”), by specifying the handle of the menu as the hmenu parameter of the CreateWindowEx function, or by calling the SetMenu function.

You can use the TrackPopupMenu function to display a pop-up menu. To do so, you pass the handle of a pop-up menu to the function. You must also specify the menu's owner window, the screen position where Windows should display the menu, and the mouse button that the user must use to choose an item.