2.1.25.23 GetMenu


Description

The GetMenu function retrieves a handle to the menu assigned to the specified window.

Syntax

HMENU GetMenu( HWND hWnd )

Parameters

hWnd
[input] Handle to the window whose menu handle is to be retrieved.

Return

The return value is a handle to the menu. If the specified window has no menu, the return value is NULL.

If the window is a child window, the return value is undefined.

Examples

EX1

void GetMenu_ex1()
{
	HMENU hmn = GetMenu(GetWindow());
	if ( IsMenu(hmn) )
		out_str("Get Menu handler successfully");
	return;
}

Remark

See Also

SetMenu, GetSubMenu, IsMenu

Header to Include

origin.h

Reference