I am using CComboBox in my project. I want to change the color of the border combo box on focus
Finally it is done and it has a very easy solution. I just overridden the onpaint method of the control.
void CComboBoxOwn::OnPaint()
{
CDC *dc = m_Parent->combobox->GetDC();
CRect rc;
m_Parent->combobox->GetClientRect(rc);
HBRUSH hBrush = CreateSolidBrush(COLORREF(RGB(255, 0, 0)));
FrameRect(dc->m_hDC, rc, hBrush);
DeleteObject(hBrush);
ReleaseDC(dc);
return;
}