|
Question : changing formview background color
|
|
Hi..
It's simple question. How can I change my formview background color?
|
|
Answer : changing formview background color
|
|
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, pWnd, nCtlColor); 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
|
|
|
|