tags:

views:

24

answers:

1

I want to change the font color of text in a disabled CEdit control which is currently system gray.

As I use a gray background, I wish to change the font color of text ( currently set to rgb value of COLOR_GRAYTEXT) in order to make it easier to read.

There is a solution by using SetSysColors() but that has an ill effect of changing that value for all the applications that are running.Does anyone knows of a better solution?

I tried handling the WM_CTLCOLORSTATIC/ WM_CTLCOLOREDIT message, but the SetTextColor() method didn`t seem to work and application continued to use the system graytext. Does anyone knows the right way to do this?

A: 

Seems like this would work: http://www.codeproject.com/KB/edit/ceditbkcolor.aspx

Jeff
This is useful stuff. I was able to change the color by overwriting the existing text. However, the default text is still getting drawn and is visible when I do not exactly superimpose the existing text. Can I somehow stop the default text rendering in order to make it more efficient?