Software Archive
Read-only legacy content
17061 Discussions

Icon or bitmap?

davidgraham
Beginner
921 Views
I have just managed to display a bitmap on a button.
I could also have used icons.
Is there any difference between using icons or bitmaps?

Thanks,
David
0 Kudos
4 Replies
Jugoslav_Dujic
Valued Contributor II
921 Views
Not essential -- icons can be transparent but they're limited to 16x16 or 32x32 pixels. You can simulate transparency with bitmaps if you specify LR_LOADMAP3DCOLORS flag in LoadImage and use gray, light gray and dark gray for "transparent" areas.

Btw, my recommendation is to use an unusual combination of system colors when developing, to ensure that users with "weird" system color settings will have correct display.

Jugoslav
0 Kudos
davidgraham
Beginner
921 Views
Thanks,
I hadn't known about LR_LOADMAP3DCOLORS so I have changed all my bitmaps to icons so they would be transparent!
I see LR_LOADTRANSPARENT would also do the job
David
0 Kudos
Jugoslav_Dujic
Valued Contributor II
921 Views
Btw, David, since you've already done it with icons -- how does the BS_ICON butoon look like when disabled? With bitmaps and LR_LOADMAP3DCOLORS it's pretty ugly -- only original white is mapped into light color, and the rest of the image looks like a dark square.

Jugoslav
0 Kudos
davidgraham
Beginner
921 Views
Jugoslav,

Icons work very well. I first tried bitmaps, but as you say they don't look very good when disabled - you get a dark square.
With Icons you get what you expect, the 'picture' is in different shades of grey.

David
0 Kudos
Reply