Scroll Bars

This is a discussion on Scroll Bars within the Windows Programming forums, part of the Platform Specific Boards category; I wish to use a scroll bar as a slider. I've worked out how to get a scrollbar on the ...

You can set the range of a scroll bar using SetScrollInfo. You respond to movement by handling the WM_HSCROLL or WM_VSCROLL messages depending on whether the scroll bar is horizontal or vertical. This is slightly complicated, as you have to manually update the position. There is an example at MSDN: