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.
hmenu
Identifies the menu to be destroyed.
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.
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.
CreateMenu, DeleteMenu, ModifyMenu, RemoveMenu