[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Intuition' (#aros)

ItemAddress

Returns the address of the specified MenuItem.

Declaration

Source position: intuition.pas line 3211

function ItemAddress(

  MenuStrip: PMenu;

  MenuNumber: Word

):PMenuItem;

Arguments

MenuStrip

  

A pointer to the first menu in your menu strip

MenuNumber

  

The value which contains the packed data that selects the menu and item (and sub-item). See the Intuition Reference Manual for information on menu numbers.

Function result

If MenuNumber = MENUNULL, this routine returns nil, else this routine returns the address of the menu item specified by MenuNumber.

Description

This routine feels through the specified menu strip and returns the address of the item specified by the menu number. Typically, you will use this routine to get the address of a menu item from a menu number sent to you by Intuition after user has chosen from a window's menus.

This routine requires that the arguments are well-defined. MenuNumber may be equal to MENUNULL, in which case this routine returns nil. If MenuNumber doesn't equal MENUNULL, it's presumed to be a valid item number selector for your menu strip, which includes:

Note that there must be both a menu number and an item number. Because a sub-item specifier is optional, the address returned by this routine may point to either an item or a sub-item.


Documentation generated on: 2017-01-10