Dela via


CMFCToolBarMenuButton::SetMenuOnly

Specifies whether the button is drawn as a menu button or a split button when it has both a valid command ID and a submenu.

void SetMenuOnly(
   BOOL bMenuOnly 
);

Parameters

  • [in] bMenuOnly
    TRUE to show this button as a menu button when it has both a valid command ID and a submenu, FALSE to show this button as a split button when it has both a valid command ID and a submenu.

Remarks

Typically, when a toolbar menu button has both a submenu and a command ID, the menu appears to be a split button that has a main button and an attached down arrow button. If you call this method and bMenuOnly is TRUE, the button instead appears to be a single menu button with a down arrow in the button. When the user clicks the arrow in either mode, the submenu opens, and when the user clicks the non-arrow part of the button in either mode the framework executes the command .

Requirements

Header: afxtoolbarmenubutton.h

See Also

Reference

CMFCToolBarMenuButton Class

Hierarchy Chart