Russ:I don't know if this will help you directly, but I ran into a version of this problem when using a theme and the tab control in WinXP. With a theme, XP uses a gradient background on the tab control. Setting a radio button or check box control to transparent (invisible) background produces a nice black box in place of a transparent control. Not satisfactory.
My first solution was to determine a "middle" color that was a close match to the gradient color and simply re-color the control to match. However, someone using XP with the classic Windows interface (or using Windows 2000) gets a control with a white background on an otherwise gray tab control.
Here's the fix I used that worked for me:
First, create a custom color that matches the background color of your themed parent control or form (I made this color for the gradient tab control one of the permanent custom controls in the EZGUI Designer).
code:
EZ_DefColorL 36, &HF8F8F8
(This is an off-white that closely matches the background of the themed tab control in XP.)
Next, create a global variable to hold information about the O/S on the user's machine and initialize it as follows:
code:
gOS& = EZ_GETOS(0)
IF gOS& > 500 THEN
gOS& = VAL(ReadRegistryString$(%HKEY_CURRENT_USER, _
"Software\Microsoft\Windows\CurrentVersion\ThemeManager", _
"ThemeActive"))
ELSE
gOS& = 0
END IF
This segment determines if the user has Windows XP (or a different O/S) and if the user has XP whether themes are enabled or not. If the classic interface is being used, no re-coloring of the control will take place.
Next, in the %EZ_Loading event for each of your problem controls (such as the check box or radio button), add this:
code:
CASE %EZ_Loading
LoadColor(gOS&)
And finally, include this macro:
code:
MACRO LoadColor(x)
IF x > 0 THEN
EZ_COLOR 0, 36
ELSE
EZ_COLOR -1, -1
END IF
END MACRO
Just substitute the color number (36 in my example) for the custom color you need for drawing your background. If themes are being used, you'll get your themed color, otherwise, you get Windows' famous battleship gray.
One additional step: you could modify the macro as follows:
code:
MACRO LoadColor(fg, bg)
IF gOS& > 0 THEN
EZ_COLOR fg, bg
ELSE
EZ_COLOR -1, -1
END IF
END MACRO
This will let you set both the foreground and background of each "problem" control specifically for whatever color scheme you decide on. You would only have to define the colors you want to use in your initialization code.
Whew! It looks like a lot of work (but it's really not). Maybe it will help resolve your problem.