XLL+ Class Library (6.3)

Dynamic Toolbar Sample - Toolbar3

Uses the CXlToolbar class to add a dynamic toolbar to Excel's application window

Remarks

This project demonstrates how to use the CXlToolbar class to add a toolbar to Excel's main window, and how to dynamically enable and press the buttons. The bitmaps for the toolbar's buttons are built into the add-in as resources.

Buttons 1 and 2 enable and disable button 3. Button 4 can be pressed down and up.

Classes and functions used

CXlToolbar | CXlToolbar::AddToolbar | CXlToolbar::ShowToolbar | CXlToolbar::DeleteToolbar | CXlToolbar::AddTool | CXlToolbar::SetToolBitmap | CXlToolbar::EnableTool | CXlToolbar::PressTool | #ERROR Uses not found for CXlToolbar_GetToolDown | CXllApp::OnXllOpenEx | CXllApp::OnXllClose

Sample project

Each sample project is located in a sub-directory of the Samples directory of the XLL+ installation. To use the sample project, open the solution file Toolbar3.sln or the project file Toolbar3.vcproj.

You can enable debugging under Excel by using the Setup Debugging command in the XLL+ ToolWindow.

When delivered, the help files are excluded from the build. You can enable the help build by selecting the files Toolbar3.help.xml and Toolbar3.chm in the Solution Explorer, and using the right-click menu to view Properties. Select the page "Configuration Properties/General" and set the "Excluded from build" property to "No". See Generating help in the User Guide for more information.

See Also

List of Sample Projects | Simple Toolbar | Simple Toolbar using resources | Toolbars (User Guide)