Share via


Menu Routines

These API routines allow you to create, manipulate, and release menus.

_ActivateMenu( )

Displays the specified menu on the screen and immediately returns control to the calling routine.

_CountItems( )

Returns the number of menu titles or bars on the specified menu.

_DeActivateMenu( )

Removes a menu from the screen.

_DisposeItem( )

Releases the specified menu item and frees all storage associated with this item.

_DisposeMenu( )

Releases the specified menu and all its items and frees all storage associated with this menu.

_GetItemCmdKey( )

Copies the displayed keyboard shortcut string for the specified menu item to the buffer pointed to by the text parameter.

_GetItemId( )

Returns the item identifier of the index item in the specified menu.

_GetItemSubMenu( )

Returns the menu item identifier or a submenu assigned to a menu item.

_GetItemText( )

Copies the text of a menu bar or menu title to the buffer pointed to by text.

_GetNewItemId( )

Returns an identifier that is currently available for use as an item identifier in the specified menu.

_GetNewMenuId( )

Returns an identifier that's available for use as a menu identifier.

_MenuId( )

Returns the actual menu identifier that corresponds to the system-defined literal for the system menu title or menu.

_MenuInteract( )

Sets the itemid and the menuid to indicate which menu item was selected, if any.

_NewItem( )

Adds an item with the specified itemid to the menu specified by menuid.

_NewMenu( )

Creates a new menu of the specified menu type.

_OnSelection( )

Specifies a routine to execute when the specified menu and item are selected.

_SetItemCmdKey( )

Sets the keyboard shortcut for the specified menu item, as well as the displayed text for the keyboard shortcut.

_SetItemSubMenu( )

Assigns a submenu to a menu item. This can be used to attach a menu to a title, or a submenu to a menu item.

_SetItemText( )

Changes the displayed text for a menu item. The item may either be a pad or a bar.

_SetMenuPoint( )

Specifies the upper left corner, loc, of a menu.

_SetMenuPointP( )

Specifies in pixels the screen position of the upper left corner, loc, of a menu.