1.9 Menu Functions

Menu functions create, modify, and destroy menus. A menu is an input tool in a Windows application that offers users one or more choices, which they can select with the mouse or keyboard. An item in a menu bar can display a pop-up menu, and any item in a pop-up menu can display another pop-up menu. In addition, a pop-up menu can appear anywhere on the screen. The following list briefly describes each menu function:

Function Description  
AppendMenu Appends a menu item to a menu.  
CheckMenuItem Places or removes checkmarks next to pop-up menu items.  
CreateMenu Creates an empty menu.  
CreatePopupMenu Creates an empty pop-up menu.  
DeleteMenu Removes a menu item and destroys any associated pop-up menus.  
DestroyMenu Destroys the specified menu.  
DrawMenuBar Redraws a menu bar.  
EnableMenuItem Enables, disables, or grays a menu item.  
GetMenu Retrieves a handle to the menu of
a specified window.
 
GetMenuCheckMarkDimensions Retrieves the dimensions of the default menu checkmark bitmap.  
GetMenuItemCount Returns the count of items in a menu.  
GetMenuItemID Returns the item's identification.  
GetMenuState Obtains the status of a menu item.  
GetMenuString Copies a menu label into a string.  
GetSubMenu Retrieves the menu handle of a pop-up menu.  
GetSystemMenu Accesses the System menu for copying and modification.  
HiliteMenuItem Highlights or removes the high-lighting from a top-level (menu-bar) menu item.  
InsertMenu Inserts a menu item in a menu.  
LoadMenuIndirect Loads a menu resource.  
ModifyMenu Changes a menu item.  
Function Description  
RemoveMenu Removes an item from a menu but does not destroy it.  
SetMenu Specifies a new menu for a window.  
SetMenuItemBitmaps Associates bitmaps with a menu item for display when an item is and is not checked.  
TrackPopupMenu Displays a pop-up menu at a specified screen location and tracks user interaction with the menu.