void CBCGPRibbonButton::AddSubItem | ( | CBCGPBaseRibbonElement * | pSubItem, |
int | nIndex = -1 |
||
) |
Allows to create a popup menu on the fly by dynamically adding new ribbon elements.
Call this function to dynamically add sub items to popup menu.
NOTE. If you have used SetMenu() this method will have no effect. In other words you have two independent methods to assign a popup menu to button:
pSubItem | Points to the new element to add. |
nIndex | Zero-based subitem index. By default, the subitem will be added to the end of subitems list. |