WEBINAR:On-Demand

.
If you are interested in more articles written by Kirk Stowell, you can
click here to visit his home page.

If you wanted to add hot toolbar buttons like the ones seen in internet explorer, it is pretty
straight forward. This approach for will work for both Visual C++ 5 and 6, however you may
want to read up on the enhancements to the toolbar class for VC 6.0.

After your toolbar has been created in CMainFrame::OnCreate(), you will
need to add the following code, this is assuming that you have two bitmap resources already
created IDB_TOOLBAR_COLD for normal, and IDB_TOOLBAR_HOT for hot buttons:

The send message portion of the code has been wrapped into a CToolBarCtrl() function
call for Visual C++ 6. If you will notice, I have used 24 bit color images with the toolbar
shown here, so you are not limited to just 16 colors.

in case some toolbar buttons gets enabled/disabled at run time in your app.

First of all I wish to thank Mr.Kirk Stowell for his article on hot toolbar buttons.After reading his article i was able to implement the same in my project.Thanx once again. I hope to read more articles of yours in future.

Just a little addition to his article.

In case in your application as a result of some operations some of your toolbar buttons gets enabled and disabled,to handle that u can have one more bitmap and using
TB_SETDISABLEDIMAGELIST in your SendMessage(). See code given below.

After your toolbar has been created in CMainFrame::OnCreate(), you will need to add the following code, this is assuming that you have three bitmap resources already created IDB_TOOLBAR_COLD for normal,IDB_TOOLBAR_HOT for hot buttons and IDB_TOOLBAR_DISABLE for disabled buttons:

THE ARTICLE AND SOURCE CODE ARE OUTDATED, PLEASE FOLLOW THIS LINK FOR THE LATEST UPDATE

Until I am able to update this article, as an alternative, please visit this link http://www.codejock.com/ for the latest updates. My email address has changed also, please respond to kstowell@codejock.com...

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.

Thanks for your registration, follow us on our social networks to keep up-to-date