Hi,
im getting nuts, is there a way to change the colors of a scrollbar inside a normal listbox?
the listbox is inside a greater dialog.
Thanks in advance.
Greetings
Seltsamuel
The scrollbar in the list box is not actually a scrollbar component, it is drawn. As such it is not possible to get an handle for it and WM_CTLCOLOR... messages do not work.
You could subclass the list box and paint your own scrollbar in the WM_NCPAINT handler. Another option might be to subclass the list box and add a scroll bar control as a child placing it on top of the list box's scroll bar.
Neither of these ideas would appeal to me.
Perhaps you could use a list view instead. It could be configured to look and behave like a list box and it uses actual scroll bars so the WM_CTLCOLOR messages should work.
Hi,
The more i get comfortable with Windows Programming the more i get the opinion the developers at Microsoft are simply nuts. I try rethinking my dialog to use a listview but i used a listbox because of the scrollable imagebuttons i placed there, what a holy crap.
Thanks for the answer.
Greetings
Seltsamuel