void CBCGPRibbonButton::SetMenu | ( | HMENU | hMenu, |
BOOL | bIsDefaultCommand = FALSE , |
||
BOOL | bRightAlign = FALSE , |
||
BOOL | bKeepMenuHandle = FALSE , |
||
BOOL | bDrawMenuArrow = TRUE |
||
) |
Assigns a popup menu to ribbon button.
Use this method to assign a popup menu to ribbon button. When the menu has been assigned the button displays an arrow at the right side. If bIsDefaultCommand is TRUE, the menu appears only when user clicks the arrow. If user clicks the button its default command is executed.
If bIsDefaultCommand is FALSE, the menu appears always, disregard where the button was clicked.
hMenu | A handle to Windows menu to assign. |
bIsDefaultCommand | Specifies whether the button can still execute its command (TRUE), or always displays popup menu (FALSE). |
bRightAlign | If TRUE, the menu is right aligned. |
bKeepMenuHandle | If TRUE, the menu is not converted to sub-items list. |
bDrawMenuArrow | If this parameter is FALSE, there is no space allocated for the menu arrow and this arrow is not drawn. |