How does PB draw transparent gadgets on panels, Fred?

Everything else that doesn't fall into one of the other PB categories.
Justin
Addict
Addict
Posts: 956
Joined: Sat Apr 26, 2003 2:49 pm

How does PB draw transparent gadgets on panels, Fred?

Post by Justin »

using XP themes the panel background uses a gradient color, normally if you use the win api the control background don't match the gradient, they use a solid color, it's a known problem. how does PB solve it?, it is using ownerdrawn gadgets setting the background to transparent?, or is there an easier way?
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

There is an ugly trick to workaround this by monitoring the WM_CTLCOLORBTN and like message and creating the right brush with the xptheme dll function. I don't know if there is another way, but it's the only things we find for it (and there is still problem about the brush alinment to be solved...).
Justin
Addict
Addict
Posts: 956
Joined: Sat Apr 26, 2003 2:49 pm

Post by Justin »

Looks like the best way is to create a modeless child dialog for each panel that contains the controls for that panel. then you use EnableThemeDialogTexture_() with ETDT_ENABLETAB with each dialog and magically all controls will become transparent matching the tab background. i have tested this in my app using the dialog functions i posted here and it works. but implementing this with the PB functions should be tricky, each panel needs its own dialog callback to handle the dialog controls, etc..
Post Reply