CreateMenuEx

Last Updated2014-12-13
Created At2007-05-14

Creates a Menu from a MenuStyle. The Handle must be closed with CloseHandle().

native Menu CreateMenuEx(Handle hStyle = INVALID_HANDLE, MenuHandler handler, MenuAction actions = MenuAction_Select | MenuAction_Cancel | MenuAction_End)

Parameters

Handle hStyle
MenuStyle Handle, or INVALID_HANDLE to use the default style.
MenuHandler handler
Function which will receive menu actions.
MenuAction actions
Optionally set which actions to receive. Select, Cancel, and End will always be received regardless of whether they are set or not. They are also the only default actions.

Return Value

Menu A new menu Handle.

Error

Invalid Handle other than INVALID_HANDLE.