How can I change the color of an edit box?
Printable View
How can I change the color of an edit box?
Use the WM_CTLCOLOR-message.
Your dialog can trap the WM_CTLCOLOR message.
Look up the MFC Help file notes for CWnd::OnCtlColor().
Before a control is about to paint itself, the parent
window receives a chance to set its own default text color and background brush.
Also, check out the Knowledge Base article Q117778,
"Changing the Background Color of an MFC Edit Control."
Cesario Simões, Jr.