R
Schon mal vielen Dank! Ich bin jetzt schon ein wenig weiter! Folgendes habe ich in der OnCtlColor meiner Listbox-Klasse
HBRUSH CMyComboBox::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CComboBox::OnCtlColor(pDC, pWnd, nCtlColor);
if(nCtlColor==CTLCOLOR_LISTBOX)
{
HBRUSH Pinsel;
Pinsel=CreateSolidBrush(RGB(255,255,0));
pDC->SetBkColor(RGB(255,255,0));
pDC->SetBkMode(TRANSPARENT);
return Pinsel;
}
if(nCtlColor==CTLCOLOR_EDIT)
{
HBRUSH Pinsel;
Pinsel=CreateSolidBrush(RGB(255,255,0));
pDC->SetBkColor(RGB(255,255,0));
pDC->SetBkMode(TRANSPARENT);
return Pinsel;
}
return hbr;
}
Die Elemente werden auch wie gewünscht gelb, außer wenn die Combobox als Dropdown-Listenfeld konfiguriert ist. Dann ist nur die DropDown-Liste gelb, aber die Auswahl bleibt Weiß! Gibt es da noch einen Trick?