CreatePopupMenu

  HMENU CreatePopupMenu(void)    

The CreatePopupMenu function creates a pop-up menu. The menu is initially empty but can be filled with menu items by using the AppendMenu and InsertMenu functions.

Parameters

This function has no parameters.

Return Value

The return value is the handle of the newly created pop-up menu if the function is successful. Otherwise, it is NULL.

Comments

The application can add the pop-up menu to an existing menu or pop-up menu, or it may display and track selections on the pop-up menu by calling the TrackPopupMenu function.

Resources associated with a pop-up menu that is assigned to a window are freed automatically. If the pop-up menu is not assigned to a window, an application must free system resources associated with the menu before exiting. An application frees menu resources by calling the DestroyMenu function.

See Also

AppendMenu, CreateMenu, InsertMenu, SetMenu, TrackPopupMenu