'How to change the position of a window scrollbar?

How to change the position of the Vertical Scrollbar of a window?

I'm referring to the position in xy, for example set it in the middle of the window instead of the edges.

Scrollbar



Solution 1:[1]

You cannot reposition a scrollbar that is built-in to a window. You will have to disable the native scrollbar (remove the window's WS_HSCROLL/WS_VSCROLL style) and then create a separate ScrollBar control as a child of the window. Then you can position that child wherever you want, using the x/y parameters of CreateWindow/Ex() or SetWindowPos().

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1