CreateMenuEx Function

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

Menu CreateMenuEx(Handle hStyle, MenuHandler handler, MenuAction actions)

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

A new menu Handle.

Errors

Invalid Handle other than INVALID_HANDLE.