The default Listbox Scrollbar is drawn by the Listbox
You must use a Scrollbar control : Scroll Bar to customize it
There is also Flat Scrollbars, but old now
A test with both (Red is a Flat Scrollbar, Magenta a Scrollbar control) :
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Would like to ask some questions regarding the scrollbar of a ListBox (WS_VSCROLL).
1- Is possible to change the transparency of the scrollbar?
2- Is possible to change the position of the scrollbar?
https://learn.microsoft.com/en-us/windows/win32/controls/wm-ctlcolorscrollbar
I thought in handle the message ctlcolorscrollbar and return a nullbrush, but as pointed:
Scrollbars attached to a window (WS_SCROLL and WS_VSCROLL) do not generate this message
I'm working on creating a custom Listbox with custom scrollbars
trying to find a way to keep the VScrollbar but keep it invisible, then I could draw a fake click-through custom scrollbar above it.
The default Listbox Scrollbar is drawn by the Listbox
You must use a Scrollbar control : Scroll Bar to customize it
There is also Flat Scrollbars, but old now
A test with both (Red is a Flat Scrollbar, Magenta a Scrollbar control) :