Share via


CMFCToolBarMenuButton::GetCommands

Gives read-only access to the list of commands in the toolbar menu.

const CObList& GetCommands() const;

Return Value

A const reference to a CObList Class object, which contains a collection of CMFCToolBarButton Class objects.

Remarks

A toolbar menu button can display a submenu. You can provide the list of commands in the submenu in the constructor or in CMFCToolBarMenuButton::CreateFromMenu as a handle to a menu (HMENU). The menu is converted to a list of objects that are derived from CMFCToolBarButton Class and stored in the internal CObList object. You can access this list by calling this method.

Requirements

Header: afxtoolbarmenubutton.h

See Also

Reference

CMFCToolBarMenuButton Class

Hierarchy Chart