Used to create run-time toolbars which are attached to the Excel main window.
The CXlToolbar class can be used to create run-time toolbars which are attached to the Excel main window. Each toolbar can contain any number of buttons.
Note that all the methods of CXlToolbar are static. Thus, you need never
instantiate an object of type CXlToolbar; instead you call each function
with static scope, e.g.:
The toolbar should be usually be created during the CXllApp::OnXllOpenEx() event, using the AddToolbar() method. Once a toolbar has been created, tool buttons can be added using AddTool(). When the toolbar is completely set up, it can be made visible using ShowToolbar().
Many of the text arguments to CXlToolbar methods may be resource ID strings. These are loaded from the application resource file at run-time. For example, you can add a toolbar whose name is held in resource 234 in the resource file, as follows:
CXlToolbar::AddToolbar("#234");The string will be loaded in the current user's preferred language, if available. See International support for more information.
The functions that accept and translate resource ID strings are listed below.
You can find full examples of using the CXlToolbar class below: