Page 1 of 1
How does PB draw transparent gadgets on panels, Fred?
Posted: Mon Aug 01, 2005 12:35 pm
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?
Posted: Mon Aug 01, 2005 12:59 pm
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...).
Posted: Mon Aug 01, 2005 3:32 pm
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..