Page 1 of 1
SysImageList problem

Posted:
June 22nd, 2004, 9:04 am
by Johnny_Bit
Hi, I have little problem with SysImageList, concretly with drawning icons. The problem is that icon is placed on non-transparent white square and no settings about drawning style, or bk color can change it. maybe screen will show it:

Posted:
June 22nd, 2004, 10:11 am
by Kambiz
Probably you set the DrawingStyle property of TSysImageList to dsNormal. It should be dsTransparent.

Posted:
June 22nd, 2004, 1:58 pm
by Johnny_Bit
it is dsTransparent by Default.. i tried to change blend and bk color to cl none but that doesn't help...

Posted:
June 22nd, 2004, 7:45 pm
by Kambiz
It could not be because of TSysImageList, because the component just set the image list handle, and doesn't override the base class methods.
Are you using a third party XP Theme Manager?

Posted:
June 23rd, 2004, 9:40 am
by Johnny_Bit
Well i do use ThemeManager from Delphi Germs, but when i removed it (completly, so there are no even single call or unit left knowing 'bout existence of it) and problem still exist...

Posted:
June 27th, 2004, 9:05 pm
by Kambiz
Is the drawing okay when you use TImageList instead of TSysImageList?

Posted:
June 29th, 2004, 4:31 pm
by Johnny_Bit
Icons & bitmaps works fine, but i didn't tried 32 bits icons. i try later, more sets but it seems that this problem is hard to solve...

Posted:
June 30th, 2004, 4:30 pm
by Kambiz
Hi,
Suddenly today I encountered to the same problem in my own application.
The controls use either ImageList_Draw or ImageList_DrawEx API function to draw an imagelist image on their device context. The controls that using the second API, have problem with image transparency.
ImageList_DrawEx API as one of its parameters needs the background color, and imagelist provides a value for this parameter by BkColor property. To have a transparent image, the BkColor property must be clNone.
To resolve the problem in SysImageList, I changed the default value of BkColor property to clNone.
The update is available to download.
Cheers,
Kambiz

Posted:
July 4th, 2004, 10:29 am
by Johnny_Bit
heh... i didn't thinked that it was it... i've got same problem with api functions when i tried to make nice gray out effect and hotlight efect on images... damn.. if i had just hard line connection to internet on my home computer... it would be great. thanks a lot Kambiz