Menus

Overview

About menus

This topic discusses menus in general.

 

Shortcut keys

The table of string values used for the shortcut keys.

 

Menu styles

This topic discusses menu styles.

 

Commands and Functions

CreateMenuItem

The CreateMenuItem command inserts a new menu item into a menu or menu bar at specified position.

 

CreatePopupMenuEx

The CreatePopupMenuEx command creates a popup menu which is initially empty. You can insert or append menu items by using CreateMenuItem command.

 

DeleteMenuItem

The DeleteMenuItem command deletes an item with the specified menu item ID or multiple items from the specified IDs range. If the menu item opens submenu, this command destroys submenu and frees the memory used by the submenu.

 

DisplayPopupMenu

The DisplayPopupMenu command displays a popup menu at the specified location.

 

HideMenuItem

The HideMenuItem command hides an item with the specified menu item ID or multiple items from the specified IDs range. If the menu item opens submenu, this command hides submenu too.

 

IsChecked

The IsChecked function determines whether a menu item checked or unchecked.

 

IsEnabled

The IsEnabled function determines whether a menu item enabled or disabled.

 

LoadMenuItemIcon

The LoadMenuItemIcon command associates the specified icon with a menu item.

 

SetContextMenuHandle

The SetContextMenuHandle command assigns popup menu as the right-click (context) menu.

 

SetMenuBarRightorder

The SetMenuBarRightorder command right-justifies the menu bar and all menu items and causes menus cascade right-to-left (the default is left-to-right). This is used to support right-to-left languages, such as Arabic and Hebrew.

 

SetMenuItemChecked

The SetMenuItemChecked command checks or clears the menu item. A check mark is placed next to the checked menu item.

 

SetMenuItemEnabled

The SetMenuItemEnabled command enables or disables the menu item or multiple items from the specified IDs range. An application grays a disabled menu item to provide a visual cue to the user that a command is not available.

 

SetMenuItemText

The SetMenuItemText command changes the text string of the specified menu item.

 

SetMenuShortcutAsGlobal

The SetMenuShortcutAsGlobal command makes menu item's shortcut keys responsible to user's key pressings even if the application window is not active.

 

ShowMenuItem

The ShowMenuItem command makes visible previously hidden item with the specified menu item ID or multiple items from the specified IDs range.