Click to See Complete Forum and Search --> : Changing Color of an Edit Control


flotat
April 15th, 1999, 05:35 AM
Hi !

I'm having a little problem when trying to change the background/text color of an edit control (with ES_MULTILINE style).
I'm using the WM_CTL_COLOR message but only the first line is colored with the correct color.
When i add a new line to the control, the color is correct. So i tried to manage the OnEraseBackGround & OnPaint event
in order to repaint the color by myself (but it doesn't work fine because i use FillRect to repaint all the control, overriding the text color)
Anybody has an idea of my problem ?
thanks.

flotat
April 15th, 1999, 06:38 AM
I found the problem. My Background CBrush member was not correctly initalized.