|
HBrush tvisualcombo::onctlcolor(CDC* pdc, CWND* pwnd, UINT nctlcolor) { HBrush hbr = ccombobox::onctlcolor(pdc, pwnd, nctlcolor); switch (nctlcolor) { case ctlcolor_edit: break; case ctlcolor_listbox: if (listwidth > 0) { // new width of a listbox is defined CRect rect; pwnd->GetWindowRect(&rect); if (rect.Width() != listwidth) { rect.right = rect.left + listwidth; pwnd->MoveWindow(&rect); } } break; }
// todo: return a different brush if the default is not desired return hbr; } |