DestroyMenu
The DestroyMenu
function destroys the specified menu and frees any memory that the menu occupies.
BOOL DestroyMenu(
HMENU hMenu |
// handle to menu
to destroy |
); |
|
Parameters
hMenu
Identifies
the menu to be destroyed.
Return Values
If the
function succeeds, the return value is nonzero.
If the
function fails, the return value is zero. To get extended error information,
call GetLastError
Remarks
Before
closing, an application must use the DestroyMenu function to destroy a
menu not assigned to a window. A menu that is assigned to a window is
automatically destroyed when the application closes.
See Also