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.
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.