CreateMenu

  HMENU CreateMenu(void)    

The CreateMenu function creates a 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 menu if the function is successful. Otherwise, it is NULL.

Comments

Resources associated with a menu that is assigned to a window are freed automatically. If the 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, DestroyMenu, InsertMenu, SetMenu