In order to set a background color for the active control I am using
private void ProcessEnter(object sender, EventArgs e)
{
((Control)sender).BackColor = Color.LightYellow;
}
but that also changes the background color of the dropdown list which looks weird. How can I prevent this?
This code seems to work. A
ComboBoxis composed of 3 separate handles (the container, the text edit, the list). Get a handle to thehwndListwindow. When the list window receives a message and the combo is in the dropped down state, set theBackColorto white. If theComboBoxwindow receives theWM_ERASEBACKGROUNDmessage, then set theBackColorback to yellow.