Click here to Skip to main content
11,922,788 members (51,507 online)
Click here to Skip to main content
Add your own
alternative version


230 bookmarked

Super ImageList and ToolBar generator

, 22 Apr 2004
Rate this:
Please Sign up or sign in to vote.
A drag & drop ImageList and ToolBar generator . Simplifies creation of large image lists and supports effects .
<!-- Article image -->

Please Note

If you like this and find it usefull you should rate it. It`s my only satisfaction for writing this. Wink | ;) 10x


What is this for? Why should I use this software.

It's quite simple: you have to build an application with a tree control and you need images for the branches. You have to create a bitmap with all of them and then create the image list, set transparency color, etc.

If you have 100 gifs you want to use the problem is big. This program can generate a bitmap with 100 gifs in 2-3 seconds. It also generates the resource script and defines if you want to use this as a toolbar and provides code to integrate this bitmap to a image list.

You can add 3 effects to the images: Lighten, Darken and Grayscale . It also supports a plug-in framework for your own custom processing of the image before generation. So , using this a toolbar is ready in a few minutes.

If images are smaller then the toolbar button size you set then you can assign some alignment settings.

The entire UI has tips so using it will be rather easy. The help section is filled-in so you can read a more detailed description of the functionality and functions of this software.

It provides a great integration with the CTrueColorToolbar class. So , this is intended to make the lives of those of us fighting with image lists easier.

For further image processing you can integrate the CxImage library but I did not find this absolutely vital, although integration is very simple.

How it Works

You have to set the root directory where the files will be generated and then:

  • add images
  • set button sizes
  • set effects (if required)
  • set alignment (if required)
  • and press generate .

The file will also "spit" a .html file containing all the images with the src="original image") and the alt="Toolbar Button ID , Index". The index you use when you use an image list. So if you have 200 images you can search in this html the one you want and it will tell you its index.

HTML Helper

Even if this might not be the most simple solution it`s the closest thing available.

Convert Image to Source Code

I added another function. It generates the Bitmap as an array and gives you the possibility to use that bitmap without requiring a bitmap resource.

//The Acrobat Reader icon .
DWORD ImageBits [16][16]={

//Below is the code 4U2 use 2 show it on CDC named destinationDC
CBitmap hBitmap;
CDC hdcCompatible;


You can add a plug-in built by you to further process the images. This transforms the images in shades of navy-blue. A plug-in exports these 2 functions:

void APIENTRY ProcessPixels(RGBX* Pixels,RECT Rect,UINT BWidth,UINT BHeight);
void APIENTRY ProcessHDC(HDC DC,RECT Rect,UINT BWidth,UINT BHeight);


FX Grayscale
FX : Lighten 50%
FX : Darken 50%
Plugin : XPlize


This article makes use of CPicture available here on CodeProject, and CTrueColorToolbar. For the interface it has integrated the CoolControlsManager and my ToolTipCtrlEx. To add image files you simply drag & drop them from Windows Explorer. If images are compatible they are added and some information on them is displayed.


  1. 11.02.2003: First release .
  2. 11.02.2003: Added new function : Convert Image To Source Code .
  3. 12.02.2003:
    • Used .dan.g.'s sugestion and inspired from his code and now the pixel processing is lightening fast. The progress bar doesn`t show the progress of by pixel editing because of perfomance (anyway it takes less than a second).
    • Fixed a few BUGS
    • Used it internally (as demo)
    • Provided projects in VC6
  4. 21.04.2004 : Added custom background color for images

If you like this article and find it usefull, please rate it. Maybe I'll develop it a little further, providing some visual editing mode. But this functionality is perfect if you get how it works.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
Romania Romania
I have been programming for the past 6 years in VBasic, Delphi, C, C++ .
I also have extended knowledge of webdesign (HTML, CSS, JavaScript, VBScript), webprogramming (PHP, ASP, ASP.NET (C#)) and database integration (mySql, MSSQL Server).
And when I`m not programming I`m working out or working on some personal projects .
Last but not least I`m looking for a project-based job in programming or webdesign .

You may also be interested in...

Comments and Discussions

GeneralExcellent Pin
mike_rc7-Oct-09 14:49
membermike_rc7-Oct-09 14:49 
Generalgood job Pin
Evanescence Lee23-Jan-09 17:24
memberEvanescence Lee23-Jan-09 17:24 
Question32 bbp? Pin
ecmel31-Jan-07 15:03
memberecmel31-Jan-07 15:03 
GeneralBUG Pin
G_S28-Aug-06 12:47
memberG_S28-Aug-06 12:47 
GeneralJust when i needed it! Pin
Zdeslav Vojkovic6-Jul-06 9:40
memberZdeslav Vojkovic6-Jul-06 9:40 
GeneralWhere I can download 24*24 gif collection Pin
li00004-Jun-06 8:06
memberli00004-Jun-06 8:06 
QuestionHow to put the image array to a CImageList? Pin
internal20-Apr-05 23:52
memberinternal20-Apr-05 23:52 
GeneralI want the feature... Pin
npocmu13-Feb-05 9:04
membernpocmu13-Feb-05 9:04 
GeneralRe: I want the feature... Pin
IBone©25-Feb-05 0:53
sussIBone©25-Feb-05 0:53 
GeneralNice and clean! Pin
Mircea Puiu10-Dec-04 6:58
memberMircea Puiu10-Dec-04 6:58 
GeneralRe: Nice and clean! Pin
TomKat10-Dec-04 11:36
memberTomKat10-Dec-04 11:36 
GeneralNice tool Pin
Donkey016-May-04 17:24
memberDonkey016-May-04 17:24 
GeneralRe: Nice tool Pin
TomKat17-May-04 0:14
memberTomKat17-May-04 0:14 
GeneralRe: Nice tool Pin
Donkey017-May-04 13:27
memberDonkey017-May-04 13:27 
GeneralRe: Nice tool Pin
TomKat18-May-04 4:55
memberTomKat18-May-04 4:55 
GeneralRe: Nice tool Pin
Donkey018-May-04 9:10
memberDonkey018-May-04 9:10 
GeneralRe: Nice tool Pin
TomKat19-May-04 6:12
memberTomKat19-May-04 6:12 
GeneralRe: Nice tool Pin
Donkey019-May-04 6:50
memberDonkey019-May-04 6:50 
Questionother gif collectings available? Pin
quzi27-Apr-04 9:13
memberquzi27-Apr-04 9:13 
AnswerRe: other gif collectings available? Pin
BClaudiu2-May-04 12:26
memberBClaudiu2-May-04 12:26 
GeneralCould not get it to compile. Pin
WREY23-Apr-04 8:36
memberWREY23-Apr-04 8:36 
GeneralRe: Could not get it to compile. Pin
li00003-May-04 12:40
memberli00003-May-04 12:40 
GeneralTransparency Pin
Dharmesh Shah5-Apr-04 6:22
sussDharmesh Shah5-Apr-04 6:22 
Congratulations on a great and highly useful tool. The only thing I am having trouble with is getting transparency to be correctly read from the BMP or GIF. I use toolbars on non-white backgrounds (like Office 2003) and the toolbar bmp generated by the app doesn't seem to correctly preserve the transparency.

Is there a way to do this?
GeneralRe: Transparency Pin
TomKat5-Apr-04 6:30
memberTomKat5-Apr-04 6:30 
GeneralRe: Transparency Pin
BClaudiu21-Apr-04 10:49
memberBClaudiu21-Apr-04 10:49 
Generalgrayscale doesn't work for w2000 Pin
umeca743-Apr-04 1:20
memberumeca743-Apr-04 1:20 
GeneralRe: grayscale doesn't work for w2000 Pin
TomKat3-Apr-04 3:20
memberTomKat3-Apr-04 3:20 
GeneralRe: grayscale doesn't work for w2000 Pin
TomKat3-Apr-04 4:53
memberTomKat3-Apr-04 4:53 
GeneralRe: grayscale doesn't work for w2000 Pin
umeca744-Apr-04 5:48
memberumeca744-Apr-04 5:48 
QuestionHow to starting? Pin
quzi18-Mar-04 21:47
memberquzi18-Mar-04 21:47 
AnswerRe: How to starting? Pin
quzi19-Mar-04 3:27
memberquzi19-Mar-04 3:27 
GeneralRe: How to starting? Pin
TomKat20-Mar-04 10:22
memberTomKat20-Mar-04 10:22 
Generala suggestion Pin
benben1-Mar-04 5:03
memberbenben1-Mar-04 5:03 
GeneralRe: a suggestion Pin
BClaudiu21-Apr-04 10:42
memberBClaudiu21-Apr-04 10:42 
QuestionSo, how does one contact you re a part-time job? Pin
Vivic20-Feb-04 5:18
memberVivic20-Feb-04 5:18 
AnswerRe: So, how does one contact you re a part-time job? Pin
TomKat21-Feb-04 3:17
memberTomKat21-Feb-04 3:17 
QuestionAny place to get the icons and toolbar bitmap? Pin
TedWu17-Feb-04 2:23
memberTedWu17-Feb-04 2:23 
AnswerRe: Any place to get the icons and toolbar bitmap? Pin
TomKat17-Feb-04 4:21
memberTomKat17-Feb-04 4:21 
GeneralRe: Any place to get the icons and toolbar bitmap? Pin
TedWu17-Feb-04 4:42
memberTedWu17-Feb-04 4:42 
GeneralRe: Any place to get the icons and toolbar bitmap? Pin
TedWu17-Feb-04 4:45
memberTedWu17-Feb-04 4:45 
GeneralRe: Any place to get the icons and toolbar bitmap? Pin
TomKat17-Feb-04 7:56
memberTomKat17-Feb-04 7:56 
GeneralGreat^2 Pin
Francesco Aruta14-Feb-04 3:02
memberFrancesco Aruta14-Feb-04 3:02 
GeneralRe: Great^2 Pin
TomKat14-Feb-04 3:07
memberTomKat14-Feb-04 3:07 
GeneralGreat! Pin
Nitron12-Feb-04 12:14
memberNitron12-Feb-04 12:14 
Generalexcellent Pin
.dan.g.11-Feb-04 19:31
member.dan.g.11-Feb-04 19:31 
GeneralRe: excellent Pin
TomKat11-Feb-04 22:14
memberTomKat11-Feb-04 22:14 
GeneralMFC Static and VC6 projects availalble . Pin
TomKat11-Feb-04 10:33
memberTomKat11-Feb-04 10:33 
GeneralThe Application in C# Pin
Antonio Barros11-Feb-04 8:38
memberAntonio Barros11-Feb-04 8:38 
GeneralRe: The Application in C# Pin
TomKat11-Feb-04 9:26
memberTomKat11-Feb-04 9:26 
QuestionYour app's toolbar? Pin
Rui Dias Lopes11-Feb-04 8:28
memberRui Dias Lopes11-Feb-04 8:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.151125.1 | Last Updated 23 Apr 2004
Article Copyright 2004 by TomKat
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid