Integrated Application Platform › Forums › General › Change background color of Editor Control › Re: Re: Change background color of Editor Control
March 6, 2013 at 12:59 pm
#967
Participant
Thank you! After some research I discovered that if you catch the CTLCOLORSTATIC message, you can change the readonly background color too!
So, if you add something like this to the EditControl:
CTLCOLORSTATIC(wParam)
{
if .textcolor isnt ""
SetTextColor(wParam, .textcolor)
SetBkColor(wParam, .color)
return .brush
}
SetBgndColor(…) will change the background even if the control is read-only! 🙂
Now my problem is that if you use that code, then the readonly background color will always be the same of the not-readonly window…