If you open Notepad, add ten lines and resize the editor to only show nine, the thumb track (the draggable block on a scroll bar) is almost the full length of the vertical scroll bar. If you add a couple of thousand rows, the thumb track is only a few pixels high.
I'd like to duplicate this bahaviour in a TCustomControl descendant where I implemented a horizontal scroll bar. So I added WS_HSCROLL to my window style (in CreateParams) and implemented a handler for WM_HSCROLL. Along the way, I use SetScrollRange and SetScrollPos to manage the range and the position of the thumb track - but the little bugger remains a near-perfect square.
What am I missing?