AliR.
Try this .....
BOOL CEditWhite::OnEraseBkgnd(CDC* pDC)
{
CBrush brNew(RGB(255,255,255));
CBrush* pOldBrush = (CBrush*)pDC->SelectObject(&brNew);
CRect rc;
pDC->GetClipBox(rc);
pDC->PatBlt(0,0,rc.Width(),rc.Height(),PATCOPY);
pDC->SelectObject(pOldBrush);
return TRUE;
}
"GT" <ContactGT_removeme_@hotmail.com> wrote in message
news:46093aa8$0$17256$c3e8da3@news.astraweb.com...
I have some read only CEdit controls on a dialog, but they appear grey. I
would like them to be white. I tried subclassing CEdit and adding the
following method (m_brBackgroundBrush is a plain white brush), but they
are still grey - any ideas? Should I overwrite the OnPaint or OnDraw
method perhaps?
BOOL CEditWhite::OnEraseBkgnd(CDC* pDC)
{
BOOL returnVal = CEdit::OnEraseBkgnd(pDC);
CRect rect;
GetClientRect(&rect);
// Tile the watermark bitmap over the screen
pDC->FillRect(&rect, &m_brBackgroundBrush);
return returnVal;
}