I want to know if it's possible to change the color of the text (and of the small arrow) and the background of the static in a CCombobox
with the Drop List
style.
My class is derived from CComboBox
and I've tried with the function CtlColor
and OnCtlColor
, but nothing seems to change the color of the ComboBox.
Here's a picture of the control with the Drop List style :
I would like the text and the arrow to change to RGB(0, 255, 255)
and the background to RGB(255,255,0)
.
Here's my function CtlColor()
:
HBRUSH CColoredComboBox::CtlColor(CDC *pDC, UINT nCtlColor)
{
if (nCtlColor == CTLCOLOR_STATIC || nCtlColor == CTLCOLOR_EDIT)
{
pDC->SetBkColor(RGB(255,255,0));
pDC->SetTextColor(RGB(0, 255, 255));
}
return m_brBkgnd;
}
It works for the style Dropdown, but not for the Drop List.
Thank you.