Developer

API Reference

IPopupMenu_LoadMenuItem()

Brew Release
Brew MP 1.0.2
See Also
IPopupMenu Interface IPopupMenu_GetMenuModel()
Description
This function adds a new item to a popup menu, loading the text from a string resource and identifying the menu
Parameters
  • pif
    []:
    Pointer to an IPopupMenu object.
  • psz
    []:
    Identifies the name of the resource file that contains the string resource to be used as the menu item text.
  • tr
    []:
    Identifies the resource that contains the string to be used as the menu item text.
  • c
    []:
    Specifies the command ID to be assigned to the new menu item.
  • f
    []:
    Bit flags identifying special characteristics for the new menu item. The popup menu recognizes the following
Interface
Prototype
   int IPopupMenu_LoadMenuItem(IPopupMenu *pif, const char *psz, uint16 tr, uint16 c, uint16 f)
Return
   
   AEE_SUCCESS            --  The menu item was successfully added to the popup menu
   AEE_ENOMEMORY          --  The memory required to accommodate the new menu item could not be allocated.
   AEE_ERESOURCENOTFOUND  --  The resource identified by 'idResText' does not exist in the specified
                              resource file.

Side Effect
None
Comment
Popup menu also takes responsibility for freeing data associated with the loaded menu items, so it is not recommended to manually manipulate the menu model if using this API.
  • Follow