DestroyMenu

  BOOL DestroyMenu(hmenu)    
  HMENU hmenu; /* handle of menu to destroy */

The DestroyMenu function destroys the given menu and frees any memory that the menu occupied.

Parameters

hmenu

Identifies the menu to be destroyed.

Return Value

The return value is TRUE if the function is successful or FALSE if an error occurs. To obtain extended error information, use the GetLastError function.

Comments

Before terminating, an application must use this function to destroy a menu that is not assigned to a window. A menu that is assigned to a window is automatically destroyed when the application terminates.

See Also

CreateMenu, DeleteMenu, ModifyMenu, RemoveMenu