Share via


Working with the Toolbar Control

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Working with the Toolbar Control.

This article explains how you can access the CToolBarCtrl object underlying a CToolBar for greater control over your toolbars. This is an advanced topic.

Procedures

To access the toolbar common control underlying your CToolBar object

  1. Call CToolBar::GetToolBarCtrl.

GetToolBarCtrl returns a reference to a CToolBarCtrl object. You can use the reference to call member functions of the toolbar control class.

Warning

While calling CToolBarCtrl Get functions is safe, use caution if you call the Set functions. This is an advanced topic. Normally you shouldn't need to access the underlying toolbar control.

What do you want to know more about

For general information about using Windows common controls, see Common Controls.

See Also

MFC Toolbar Implementation