Win32 scrollbar "slop distance" constant?

On Windows, when you use the mouse to click and drag the scroll bar to scroll up and down, you can move the mouse about 120 pixels from the scroll bar before the drag and drop stops working. (On the contrary, on the poppy, you seem to be able to move it anywhere on the screen, and resistance will still occur.)

Is there a constant that I can get into, perhaps using SystemParametersInfo or something else to get the value defined by the OS for it? I am using a control that mimics a scroll bar, and I would like to use the same behavior for how far you can go from the panel before the scroll stops.

Thanks!

+7
source share
1 answer

GetSystemMetrics has many of these meanings. However, there is no Windows API that retrieves this value.

As an aside, you should think carefully before simulating a control. There is much more code for the correct implementation of the control (including support for accessibility, keyboards, and other behaviors) that will tend to cause your scrollbar to either be absent in functions or more expensive than you plan.

+5
source

All Articles