Which color handler is called depends on the type of the combo box (with static field or with edit field). You must also check inside the handler which part of the control is affected:
HBRUSH CMyComboBox::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
if (nCtlColor == CTLCOLOR_EDIT)
{
}
return CComboBox::OnCtlColor(pDC, pWnd, nCtlColor);
}
HBRUSH CMyComboBox::CtlColor(CDC* pDC, UINT nCtlColor)
{
if (nCtlColor == CTLCOLOR_STATIC || nCtlColor == CTLCOLOR_EDIT)
{
}
return NULL;
}