Returns the address of the specified MenuItem.
Source position: intuition.pas line 3825
function ItemAddress( |
const MenuStrip: PMenu; |
MenuNumber: LongWord |
):PMenuItem; |
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. |
If MenuNumber = MENUNULL, this routine returns nil, else this routine returns the address of the menu item specified by MenuNumber.
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.