The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Grincheux on April 23, 2009, 04:21:14 PM

Title: Toolbar background
Post by: Grincheux on April 23, 2009, 04:21:14 PM
I have drawn a toolbar with many icons.
For the icons background I used the color PINK (00FF00FFh).
When the toolbar is displayed onto the screen, the background colors appears.
How can I remove it ?

The source code for the toolbar can de downloaded at http://www.phrio.biz/download/Editor/Editor.asm and the screen capture is at http://www.phrio.biz/download/Editor/Editor.JPG. I created a zip file with the two at http://www.phrio.biz/download/Editor/Editor.zip

Thanks
Title: Re: Toolbar background
Post by: hutch-- on April 24, 2009, 03:01:34 AM
You have a few more options if you put the toolbar in a rebar control.
Title: Re: Toolbar background
Post by: donkey on April 24, 2009, 03:10:37 AM
Looks like you have alpha blended images in the bitmap and they are not being displayed properly. You might try to convert them to non-alpha channel icons first.
Title: Re: Toolbar background
Post by: Grincheux on April 24, 2009, 04:53:13 PM
In fact, the problem was easy to resolve: I replaced the pink background with a white background.
The result is there : http://www.phrio.biz/download/Editor/Toolbar1.jpg

Thanks for your help.
Title: Re: Toolbar background
Post by: RadASM on April 24, 2009, 05:19:17 PM
Your can use MadWizards PNGlib (http://madwizard.org/programming/projects/pnglib) to implement png files as toolbar to your app (i.e. modded with gimp for transparent background.)
Attention: the self extracting exe might throw out an AV error but there's no virus in it. If ppl fear to get a virus on system i'll upload the related pnglib.lib and pnglib.inc for masm32 to my homepage)

By using Gimp, the tutorial to generate transparent backgrounds is: http://technewsline.net/gimp-tutorial-making-transparent-background-image/

I tested it on "test-department tutorial 20" and it worked.

Hope this helps,
WinAsmFreak
Title: Re: Toolbar background
Post by: Grincheux on April 24, 2009, 05:57:05 PM
You are TRUE and I am stupid! Because all the icons were PNG files! A lot of work for nothing!

I am going to download the library.
This will be useful for the second toolbar. This will be a lesson for me!

Thanks