Whew!!
Got it working fine now. The solution turned out to be so simple that I am embarassed I didn't get it on my own. Soon I'll be giving up my crayons for colored pencils though!
A hollow brush and transparent background mode did the trick.
Oh yes, it shows statics really right with hollow brush, but what about other controls? I am using check & option boxes, spin and group box, all of them shown wrong and using hollow brush doesn't fixed it. I've got black nonrendered rectangles instead of controls or nothing at all...
I'd be happy to get some help on this subject. Thanks
P.S. I've tried it on VC7 and VC6+manifest with the same result...
I use XP and I have not noticed a problem. However I use the classic style, not XP styles. However since this is the first time I have read anyone having that problem, I sure have doubts whether it is a bug. A static control is supposed to be a different color than other controls. I think an edit control gets the same color as a static control when the edit control has the read-only style.
Originally posted by Sam Hobbs
I use XP and I have not noticed a problem. However I use the classic style, not XP styles.
Yeah, if I set it to classic style - the tabs bg color is the same as bg color of dialog, statics, spin and all other controls, so then I have no problem, but when I use theme - tabs are painted using some light color which differs from color of all other controls. The method, described above, helped me to fix only static text appearance. I've attached screenshot, so you can see exactly what I mean.
Thanks
Last edited by Lexis; April 9th, 2004 at 03:57 PM.
Originally posted by Sam Hobbs
So which one of the two samples is an example of the problem?
First one - is a default result of placing controls on CTabCtrl, and second - after use of hollow brush. You can see different background colors on a first image, that's the problem and it resolved for static text control using hollow brush, but other controls got black area where background is not rendered at all. I could simply set bg brush color to bg color of the CTabCtrl, but GetBkColor() is not valid for CTabCtrl, so can't find way to retreive this value.
I resolved my CStatic contol background as noted previouslym but I never had a problem with any of the other controls. Group boxes and check boxes work perfectly well in all my apps.
I have seen some very wierd behavior like this when using the TRANSPARENT style set. I just ried to duplicate it in one of my apps but was unable to do so. I recommend you look at that and turn OFF the transparent style.
The only other thing I can think of is that the manifest file is screwed up.
Originally posted by Sam Hobbs
If it is a bug then it is documented by Microsoft. What KB article documents it?
I don't think there is a KB about it, but it certainly is a bug in the theming engine. The following article describes the problem in detail and gives a solution: http://www.codeproject.com/wtl/ThemedDialog.asp
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.