How to change background color of edit box

Hey,
I am working on this project where I need to update an edit box every couple of seconds with a status and based on the status I need to change the color of the background to a particular color.I am able to update the edit box with the status but is clueless on how to update background color.I have read some info on line about this but is confused.This edit box is on a tab in a dialog. Also, on this tab is a Groupable List Ctrl. Any help will be greatly appreciated.

Thanks In Advance
been a while but maybe take a look at OnEraseBkgnd()
http://msdn.microsoft.com/en-us/library/a0a52fkz(v=vs.90).aspx


i seem to recall you can get the client rect brush and do stuff with that.
To change the background color of an Edit control its parent window needs to handle WM_CTLCOLOREDIT

WM_CTLCOLOREDIT message
http://msdn.microsoft.com/en-us/library/windows/desktop/bb761691%28v=vs.85%29.aspx

or WM_CTLCOLORSTATIC if the control is read-only

WM_CTLCOLORSTATIC message
http://msdn.microsoft.com/en-us/library/windows/desktop/bb787524%28v=vs.85%29.aspx

Andy
Topic archived. No new replies allowed.