65.9K
CodeProject is changing. Read more.
Home

ToolBar Customization

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.10/5 (7 votes)

Aug 3, 2001

viewsIcon

101215

downloadIcon

2506

Toolbar Customization with drag & drop support.

Sample Image - tbcust.jpg

Introduction

This is a little example of toolbar customization using drag and drop. Some of the code used here is from other authors (Paul di Lascia, Stan Levin etc.) but this is my contribution.

Some aspects of the code are not finished (such as saving and restoring the toolbar's state). I have tested the code on Windows 2000 so please let me know if you have problems on other platforms.

The important files are:-

tbbutton.h and tbbutton.cpp which include the implementation of the buttons (edit, combo, progress, dropdown menu etc). You can derive your own buttons from this basic implementation.

toolbar.h and toolbar.cpp which include the CToolBar code for customization and button management.

tbdlg.h and which include the dialog customization interface.

mainframe.cpp which enables or disables the customization and manages the toolbars.

tbcust.cpp enables automation (without OLE, drag and drop doesn't work !)