BCGControlBar Pro for MFC
CBCGPToolbarMenuButton::CBCGPToolbarMenuButton ( UINT  uiID,
HMENU  hMenu,
int  iImage,
LPCTSTR  lpszText = NULL,
BOOL  bUserButton = FALSE 

Constructs a CBCGPToolbarMenuButton object.

You can specify uiID as a valid menu command and hMenu as a valid Windows menu handle. In this case, the created menu button can serve as a toolbar button, which can execute either a default command or display a popup menu.

You can specify either uiID or hMenu as a valid parameter. In this case, the button either executes its default command or displays its submenu.

uiIDSpecifies the command ID to execute; can be -1.
hMenuSpecifies a handle to Windows menu; can be NULL.
iImageSpecifies either predefined or user-defined image ID; can be -1.
lpszTextSpecifies the toolbar menu button's text.
bUserButtonNonzero if the button displays a user-defined image; it is zero if the button displays a predefined image associated with the button's command.