Changing Listbox Color

I had created a ComboBoxEx using the WINAPI CreateWindowEx. The class is WC_COMBOBOXEX. The ComboBox is created properly. However, I need to change the color of Dropdown List. The default color is white, I need it to be just as the Window client area color.

I tried to hook on WM_CTLCOLORLISTBOX message, but it didn't work because the ListBox of the ComboBox is already created and colored. I need to change the color before creation of the ListBox.
So, I know how to do it but what I don't know is on which event.

Any help or ideas is more than appreciated.

Ahmad
Oh till now no update on this topic? No ideas? Andy, Freddie1 and others!
Last edited on
pleaaaaaase any update??????
It should work. See:

https://msdn.microsoft.com/en-us/library/windows/desktop/bb761360%28v=vs.85%29.aspx

MSDN wrote:
the parent window can set the text and background colors of the list box by using the specified display device context handle.
MSDN wrote:
If an application processes this message, it must return a handle to a brush. The system uses the brush to paint the background of the list box.
Topic archived. No new replies allowed.