2.1.25.64 SetMenu


Description

The SetMenu function assigns a new menu to the specified window.

Syntax

BOOL SetMenu( HWND hWnd, HMENU hMenu )

Parameters

hWnd
[input] Handle to the window to which the menu is to be assigned.
hMenu
[input] Handle to the new menu. If this parameter is NULL, the window's current menu is removed.

Return

If the function succeeds, the return value is nonzero.

Examples

Remark

The window is redrawn to reflect the menu change. A menu can be assigned to any window that is not a child window.

See Also

GetMenu, GetSubMenu

Header to Include

origin.h

Reference