I'm using Visual Studio 2008 to write an application for Windows CE 6 using C++ and MFC.
I want to remove the blue highlight of a CComboBox derived class when I've selected an element. According to this MSDN article, I cannot set the style of the combo box to LBS_OWNERDRAWFIXED or CBS_OWNERDRAWFIXED to choose the color of the selection on my DrawItem function.
I've tried to use the message CBN_SELCHANGE to send a WM_KILLFOCUS message. It partially work : the control loose its focus (the selected element is not blue anymore), but if I click again the combo box, it didnt show the list of elements.
I've read that I can use the paint event to set the color of the highlight, but I didn't know or find how to do this.
How can I remove the blue highlight of the combo box?
Edit: the combobox is read-only (flag CBS_DROPDOWNLIST)