void CBCGPRibbonPaletteButton::AddSubItem | ( | CBCGPBaseRibbonElement * | pSubItem, |
int | nIndex = -1 , |
||
BOOL | bOnTop = FALSE |
||
) |
Adds a new menu item to the drop down popup menu.
It's possible to combine popup palettes (Galleries) with popup menu items. Menu items may be placed before and/or after the gallery.
Use this function to add menu items to the popup gallery.
If you wish to insert the item at the top (before the Gallery), set bOnTop to TRUE. Set this parameter to FALSE to insert the item below the Gallery. Please note, that nIndex specifies the insertion index at the top and at the bottom separately.
For example, if you need to insert one item at position 1 before the Gallery, and one item at position 1 below the gallery, nIndex in both cases should be 1.
pSubItem | A pointer to the new menu item. |
nIndex | Specifies the zero-based index to insert the item at. |
bOnTop | Specifies whether the item should be inserted before (TRUE), or after (FALSE) the palette (gallery). |