Page 1 of 1
Transparent bitmap on folder
Posted: Wed Dec 14, 2005 8:19 am
by Marco Turco
Hello,
I still have problem to display a transparent bitmap on folder with xp theme. See
www.softwarexp.co.uk/beta/bitmap_on_folder.gif
I'm working with xHarbor 0.99.5+FWH26
Is there a solution available ?
Thanks in advance
Marco Turco
Posted: Wed Dec 14, 2005 8:23 am
by Antonio Linares
Marco,
Have you tried oBmp:lTransparent := .t. after creating it ?
Posted: Wed Dec 14, 2005 9:21 am
by Marco Turco
Yes I used the transparent clause in the sample you saw.
This problem appairs only on folder with xp theme,
without xp theme the transparent clause runs fine.
We had a similar problem with the say on folder
but you alredy solved this some time ago.
Marco
Posted: Wed Dec 14, 2005 11:29 am
by Antonio Linares
Marco,
The problems comes from the gradient background where the bitmap is painted on.
FWH already provides a special function to paint transparent on gradient background:
Code: Select all
void TransBmp( HBITMAP hBitmap, int iXsize, int iYsize,
COLORREF rgbTransparent, HDC hDC,
int iXOffset, int iYOffset, int iWidth, int iHeight )
source is located at source\function\fwbmp.c. The problem is that we don't know why yet, this function looses GDI resources. We have been trying several times to find whats going wrong with it, but with no luck up to now.
If we could fix it, then we could easily paint transparent over a gradient background.
Posted: Wed Dec 14, 2005 1:04 pm
by Enrico Maria Giordano
I can't see anything wrong in the TransBmp() source code...
EMG
Posted: Wed Dec 14, 2005 1:07 pm
by Antonio Linares
Enrico,
Yes, I think the same but the fact is that if we use it, and you start resizing the main window, then you can see how it gets slower, as it were consuming more and more resources.
The code is there, so it may be used, but with caution until we know for sure if it is working ok.
Posted: Wed Dec 14, 2005 1:13 pm
by Enrico Maria Giordano
Might it be that it keeps called by the paint event when it haven't already terminated the previous execution?
Only a stub in the dark.
EMG
Posted: Wed Dec 14, 2005 1:50 pm
by Antonio Linares
Enrico,
Its a good idea, thank you
Lets check it...
Posted: Thu Dec 15, 2005 11:55 am
by Antonio Linares
We already have transparent bitmaps on folders with XP look