how to change the text color and background color of a combo box
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
You must set the color for the combobox, if the control send a Color-message. HBRUSH CxxxView::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CFormView::OnCtlColor(pDC, pWnd, nCtlColor); if ( pWnd->GetDlgCtrlID()==IDC_Status) { pDC->SetBkColor(SetColorRef(background)); //SetColorRef returns a RGB-value hbr=m_hBrush[background]; //global defined brush-table } return hbr; } SFr