Toolbar and icon's

Is there a way to display a icon image on a toolbar's button face or do you have to use a bitmap image?

Thanks
EyooperAsked:
Who is Participating?
 
MichaelSConnect With a Mentor Commented:
Ok, you can get the image list from your toolbar (using TB_GETIMAGELIST) and after this use ImageList_AddIcon(). For sure if you have a file first you should call LoadImage().
0
 
MichaelSCommented:
not sure I catch the problem. can you clarify it a bit?
0
 
TimCotteeCommented:
I am pretty certain that you need to use a bitmap.
0
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

 
EyooperAuthor Commented:
I'm referring to ( image.ico)  versus ( image.bmp).

Thanks;
0
 
TimCotteeCommented:
Ok I admit it I was wrong on this, if you use an image list to store the images for the toolbar then you can certainly use .ico files as well as .bmp.

The available options are .gif,.jpg,.bmp,.dib,.ico,.cur.

0
 
EyooperAuthor Commented:
I'm writtin a file manager program in MASM, I can extract the
system icons .ico for the various storage devices and I would
like to display thoses storage device icon's on my toolbar.

Thanks;
 
0
 
EyooperAuthor Commented:
Ok, that seems to work. Now can I display text along with my
..ico image on the toolbar button?

Thanks;
0
 
MichaelSCommented:
you can, but it looks like other question :)
0
 
mjswartCommented:
Displaying text _and_ a picture is tricky for a button:
I believe CSXButton on www.codeguru.com has a class you can use with MFC:

http://codeguru.developer.com/buttonctrl/bitmap_text_button.shtml

Maybe you could adapt it for a toolbar button

Good luck
Mike
0
 
EyooperAuthor Commented:
Thank you;
0
All Courses

From novice to tech pro — start learning today.