Condividi tramite


CMFCDropDownToolbarButton Class

A type of toolbar button that behaves like a regular button when it is clicked. However, it opens a drop-down toolbar (CMFCDropDownToolBar Class if the user presses and holds the toolbar button down.

class CMFCDropDownToolbarButton : public CMFCToolBarButton

Members

Public Constructors

Name

Description

CMFCDropDownToolbarButton::CMFCDropDownToolbarButton

Constructs a CMFCDropDownToolbarButton object.

CMFCDropDownToolbarButton::~CMFCDropDownToolbarButton

Destructor.

Public Methods

Name

Description

CMFCDropDownToolbarButton::CopyFrom

Copies the properties of another toolbar button to the current button. (Overrides CMFCToolBarButton::CopyFrom.)

CMFCDropDownToolbarButton::CreateObject

Used by the framework to create a dynamic instance of this class type.

CMFCDropDownToolbarButton::DropDownToolbar

Opens a drop-down toolbar.

CMFCDropDownToolbarButton::ExportToMenuButton

Copies text from the toolbar button to a menu. (Overrides CMFCToolBarButton::ExportToMenuButton.)

CMFCDropDownToolbarButton::GetDropDownToolBar

Retrieves the drop-down toolbar that is associated with the button.

CMFCDropDownToolbarButton::GetThisClass

Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.

CMFCDropDownToolbarButton::IsDropDown

Determines whether the drop-down toolbar is currently open.

CMFCDropDownToolbarButton::IsExtraSize

Determines whether the button can be displayed with an extended border. (Overrides CMFCToolBarButton::IsExtraSize.)

CMFCDropDownToolbarButton::OnCalculateSize

Called by the framework to calculate the size of the button for the specified device context and docking state. (Overrides CMFCToolBarButton::OnCalculateSize.)

CMFCDropDownToolbarButton::OnCancelMode

Called by the framework to handle the WM_CANCELMODE message. (Overrides CMCToolBarButton::OnCancelMode.)

CMFCDropDownToolbarButton::OnChangeParentWnd

Called by the framework when the button is inserted into a new toolbar. (Overrides CMFCToolBarButton::OnChangeParentWnd.)

CMFCDropDownToolbarButton::OnClick

Called by the framework when the user clicks the mouse button. (Overrides CMFCToolBarButton::OnClick.)

CMFCDropDownToolbarButton::OnClickUp

Called by the framework when the user releases the mouse button. (Overrides CMFCToolBarButton::OnClickUp.)

CMFCDropDownToolbarButton::OnContextHelp

Called by the framework when the parent toolbar handles a WM_HELPHITTEST message. (Overrides CMFCToolBarButton::OnContextHelp.)

CMFCDropDownToolbarButton::OnCustomizeMenu

Modifies the provided menu when the application displays a shortcut menu on the parent toolbar. (Overrides CMFCToolBarButton::OnCustomizeMenu.)

CMFCDropDownToolbarButton::OnDraw

Called by the framework to draw the button by using the specified styles and options. (Overrides CMFCToolBarButton::OnDraw.)

CMFCDropDownToolbarButton::OnDrawOnCustomizeList

Called by the framework to draw the button in the Commands pane of the Customize dialog box. (Overrides CMFCToolBarButton::OnDrawOnCustomizeList.)

CMFCDropDownToolbarButton::Serialize

Reads this object from an archive or writes it to an archive. (Overrides CMFCToolBarButton::Serialize.)

CMFCDropDownToolbarButton::SetDefaultCommand

Sets the default command that the framework uses when a user clicks the button.

Data Members

Name

Description

CMFCDropDownToolbarButton::m_uiShowBarDelay

Specifies the length of time that a user must hold the mouse button down before the drop-down toolbar appears.

Remarks

A CMFCDropDownToolBarButton differs from an ordinary button in that it has a small arrow in the lower-right corner of the button. After the user selects a button from the drop-down toolbar, the framework displays its icon on the top-level toolbar button (the button with the small arrow in the lower-right corner).

For information about how to implement a drop-down toolbar, see CMFCDropDownToolBar Class.

The CMFCDropDownToolBarButton object can be exported to a CMFCToolBarMenuButton Class object and displayed as a menu button with a pop-up menu.

Inheritance Hierarchy

CObject

   CMFCToolBarButton

      CMFCDropDownToolbarButton

Requirements

Header: afxdropdowntoolbar.h

See Also

Tasks

Walkthrough: Putting Controls On Toolbars

Reference

Hierarchy Chart

CMFCDropDownToolBar Class

CMFCToolBar Class

CMFCToolBarMenuButton Class

Other Resources

MFC Classes