Click to See Complete Forum and Search --> : How do I Change the Background Color of an edit box


srufle
May 11th, 1999, 04:34 PM
I have created an Edit control in the resource editor. I want to change to background color.
this is what i have tried
CRect editRect;
m_CreditText->GetClientRect(&editRect);
CClientDC dc (this);
CBrush * brushSR;
brushSR = new CBrush(RGB(255,0,0));

dc.FillRect(&editRect,brushSR);

delete brushSR;
could anybody give me any guidance.

sally
May 11th, 1999, 06:39 PM
the parent of the edit control, dialog or formview need to handle WM_CTLCOLOR

Sally

Sally
May 11th, 1999, 06:39 PM
the parent of the edit control, dialog or formview need to handle WM_CTLCOLOR

Sally