MenuFromHandle

Retrieves the Menu or MenuBar object which has the specified handle.

Menu := MenuFromHandle(Handle)

Parameters

Handle

Type: Integer

A value of Menu.Handle.

Remarks

If the handle is not the Handle of a menu of this script, the function returns an empty string.

In AutoHotkey, Handle is a Win32 menu handle (HMENU). In Keysharp, menus have no Win32 menu, so a native menu handle, such as one received with the WM_INITMENUPOPUP message, is never recognized. See Win32 Menus.

Win32 Menus, Menu/MenuBar object, Menu.Handle, Menu()