Hi worker018,
u can implement a formview's WM_CTLCOLOR message handler (with ClassWizard) like this:
HBRUSH CFvwView::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CFormView::OnCtlColor(pDC,
COLORREF color = RGB( 128, 128, 255 );
hbr = ::CreateSolidBrush( color );
pDC->SetBkColor( color );
return hbr;
}
maybe you also have to do this for controls you use, i.e. buttons (and also scrollbar thumbs and arrows, slider controls, spin controls), progress controls, and tab controls remain in default background color.
hope that helps,
ZOPPO
Main Topics
Browse All Topics





by: tdaoudPosted on 2000-11-07 at 01:14:40ID: 5147581
Override the OnEraseBkgnd() (WM_ERASEBKGND) and draw your own background or supply your own brush.
Good Luck,
Tarik