Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

background on static text

Status
Not open for further replies.

Casiopea

Programmer
Jan 15, 2003
47
ES
I have tried to put on a dialog a static text (IDC_STATIC20), but the dialog background is blue, and the static text background remain white (I want it to be blue as the dialog background).
Then, on the dialog box on method CtlColor(...) I have control the static background color with the object CBrush, the attribute TRANSPARENT on the static text, setting the static text background to blue color and everything is ok. When I have added another static text (IDC_STATIC18) whose background I want it to be like IDC_STATIC20, I have problems.The IDC_STATIC20 returns to white on background, I cannot change the text color and only the IDC_STATIC18 have the color I want.
I have read that I should use Invalidate(), but where? because on OnCtlColor() it makes flikering the window.

One more question; along with the use of IDC_STATIC18, I sometimes change the text, and so, the background returns to white.
I have been two days trying this and I don't understand why.
By the way on windows 98 it works perfectly. It doesn't work on Windows Xp/2K.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top