Scroll-Bar Slider Size

The slider can be displayed either as a square (the default), or as a portion of the scroll bar if SBCDATA and the SBS_THUMBSIZE style are specified at creation. Displaying the slider as a proportional rectangle permits the size of the slider to be proportional to the amount of data being viewed in the visible range. The size is set based on the visible range and the number of values in the range. As an example, where the viewing area is 20 items and the range is 100, the slider size would be 20% of the potential slider area. Note that there is no direct connection between the scroll bar range and the range value used to set the slider size. It is possible to set the scroll-bar range from 0-99, and base the slider size on a viewing area of 500 and a range of 1000. This will set the scroll-bar to have 100 positions and will display a slider that is half the size of the scroll bar.

The slider size can be set using SBM_SETTHUMBSIZE or WM_SETWINDOWPARAMS, and obtained using WM_QUERYWINDOWPARAMS.


[Back: Scroll-Bar Range and Position]
[Next: Scroll-Bar Notification Messages]