BCGControlBar Pro for MFC
BOOL CBCGPRibbonPanel::SetElementMenu ( UINT  uiCmdID,
UINT  uiMenuResID,
BOOL  bIsDefaultCommand = FALSE,
BOOL  bRightAlign = FALSE 
)

Assigns a popup menu to element with the given command ID.

Returns
Nonzero if the menu has been assigned; otherwise FALSE. The function fails if there is no element with specified command ID in the ribbon panel.

Assigns a popup menu to element with the given command ID.

Parameters
uiCmdIDElement's command ID.
uiMenuResIDMenu resource ID.
bIsDefaultCommandIf TRUE, the element can also execute its command. In this case the menu is opened when user clicks on the arrow area. If FALSE, the element can not execute its command and the popup menu appears always, no matter where users clicks the element.
bRightAlignSpecifies the popup menu alignment.