SysImageList problem

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

SysImageList problem

Postby Johnny_Bit » June 22nd, 2004, 9:04 am

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:
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Kambiz » June 22nd, 2004, 10:11 am

Probably you set the DrawingStyle property of TSysImageList to dsNormal. It should be dsTransparent.
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby Johnny_Bit » June 22nd, 2004, 1:58 pm

it is dsTransparent by Default.. i tried to change blend and bk color to cl none but that doesn't help...
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Kambiz » June 22nd, 2004, 7:45 pm

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?
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby Johnny_Bit » June 23rd, 2004, 9:40 am

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...
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Kambiz » June 27th, 2004, 9:05 pm

Is the drawing okay when you use TImageList instead of TSysImageList?
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby Johnny_Bit » June 29th, 2004, 4:31 pm

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...
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Kambiz » June 30th, 2004, 4:30 pm

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
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby Johnny_Bit » July 4th, 2004, 10:29 am

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
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 34 guests

cron