The MENU widget can be used to create several kinds of menus. Each MENU item represents an application command or a submenu. Selecting a MENU item sends a WM_MENU message to the owner
of the MENU or opens a submenu. If mouse support is enabled, the MENU widget reacts on moving the mouse over the items of a MENU widget.
MENU
MENU with new skin.
Receives focus
Yes
Skinnable
Yes
OwnerDraw
No
Uses Memory Devices
No
Attached widgets
None
Notification codes
The MENU widget does not send any WM_NOTIFY_PARENT messages to the parent window.
Keyboard reaction
The BUTTON widget reacts to the following keys if it has the input focus:
Message
Description
GUI_KEY_RIGHT
If the MENU is horizontal, the selection moves one item to the right.
If the MENU is vertical and the current item is a submenu, the submenu opens and the input focus moves to the submenu.
If the MENU is vertical and the current item is not a submenu and the top level MENU is horizontal, the next item of the top level MENU opens and the input focus moves to it.
GUI_KEY_LEFT
If the MENU is horizontal the selection moves one item to the left.
If the MENU is vertical and the MENU is not the top level MENU, the current MENU closes and the focus moves to the previous MENU. If the previous MENU is horizontal the previous submenu of it opens and the focus moves to the previous submenu.
GUI_KEY_DOWN
If the MENU is horizontal and the current MENU item is a submenu this submenu opens.
If the MENU is vertical, the selection moves to the next item.
GUI_KEY_UP
If the MENU is vertical, the selection moves to the previous item.
GUI_KEY_ESCAPE
If the MENU is not the top level MENU the current MENU will be closed and the focus moves to the previous MENU.
If the MENU is the top level MENU, the current MENU item becomes unselected.
GUI_KEY_ENTER
If the current MENU item is a submenu, the submenu opens and the focus moves to the submenu.
If the current MENU item is not a submenu, all submenus of the top level MENU closes and a MENU_ON_ITEMSELECT message will be sent to the owner of the MENU.