- Introduction—Types of Menus
- Pull-Down Menus
- Hierarchical Menus
- Pop-Up Menus
- Menu Objects, Menu IDs and Item Numbers, Command IDs, and Menu Lists
- Creating Your Application's Menus
- Providing Help Balloons (Mac OS 8/9)
- Changing Menu Item Appearance
- Adding Items to a Menu
- Associating Data with Menu Items
- Handling Menu Choices
- Hiding and Showing the Menu Bar
- Accessing Menus from Alerts and Dialogs
- Main Menu Manager Constants, Data Types, and Functions
- Demonstration Program Menus1 Listing
- Demonstration Program Menus1 Comments
- Demonstration Program Menus2 Listing
- Demonstration Program Menus2 Comments
Associating Data with Menu Items
The following functions may be used by your application to associate data with menu items:
Function |
Description |
SetMenuItemProperty |
Associates data with a menu item. |
GetMenuItemPropertySize |
Obtains the size of a piece of data that has been previously associated with a menu item. |
GetMenuItemProperty |
Obtains a piece of data that has been previously associated with a menu item. |
RemoveMenuItemProperty |
Removes a piece of data that has been previously associated with a menu item. |
Note that these functions require a command ID to be passed in their second parameter. Accordingly, they may only be used when your application uses command IDs to refer to the relevant menu items.