BCGControlBar Pro for MFC
int CBCGPPopupMenu::InsertItem ( const CBCGPToolbarMenuButton button,
int  iInsertAt = -1 
)

Inserts a new menu item at the specified position, moving other items down the menu.

Returns
The zero-based index of the position at which the item was inserted. It is -1 if the specified position is invalid.

Inserts a menu item represented by a reference to a CBCGPToolbarMenuButton object into the popup menu. If the iInserAt parameter is -1 the item is added at the end of the popup menu.

Parameters
buttonSpecifies the menu item to insert.
iInsertAtSpecifies the zero-based index of the position to insert the item. If this parameter is -1, the item is added to the end of the menu.