API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
- IMenuModel Interface
This function returns the index of the menu item stored in the menu model that matches a given menu command ID. Each item stored in the menu model is associated with a specific command ID that an attached object could use as a trigger in response to a user action -- for example, when the user selects a particular menu item, that command ID could be generated. IMenuModel_GetItemIndex() provides a mechanism for translating a command ID back into an index, so the application could (for example) dip back into the menu model to retrieve the menu item represented by that command ID.
[in] Pointer to the IMenuModel interface object.
[in] The command ID assigned to the item whose index is to be retrieved.
  •    int IMenuModel_GetItemIndex(IMenuModel *pif, uint16 idCmd); 
  • This function returns the zero-based index of the menu item with command ID 'idCmd', or -1 if the menu model does not contain an item matching this ID.
Side Effect
  • None
Menu command IDs should be unique. IMenuModel_GetItemIndex() will return the index of the last stored item in the menu model that matches the command ID passed in 'idCmd'.