Click to See Complete Forum and Search --> : Change the color of a Listbox Control


ariel_forkworks
February 22nd, 2005, 07:07 AM
Hello,
I've created a Dialog Box with contains a ListBox control, whose background color is white (by default). Now I need to change his color, but I haven't could to find any property item that let me to do this.
Could anybody help me about this question?

Thanks you.

SirNotApearingOnThisForum
February 22nd, 2005, 09:17 AM
Well according to MSDN you can catch the WM_CTLCOLORLISTBOX (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listboxes/listboxreference/listboxmessages/wm_ctlcolorlistbox.asp) notification to change text/background colours within a list box.

ariel_forkworks
February 24th, 2005, 07:55 AM
Excelent! I could do it and it works correctly.
By processing this message I can to manage the background color of the list box.

Thank you SirNotApearingOnThisForum.