The function documentation says it "captures the mouse and tracks its
movement until the user releases the left button, presses the esc key, or
moves the mouse outside the 'drag rectangle' around the specified point...
If the user moved the mouse outside of the drag rectangle while holding the
left button down, the return value is nonzero."
On Win2K (only OS I've tried) the function also returns TRUE if the user
simply holds the mouse down for half a second or so, without moving it. I
have verified this with a trivial test app. This is not inadvertent
mouse-jiggling; I've confirmed that the mouse position is not changing.
Is this a change from previous OS versions? Is this a bug in DragDetect?
Do folks generally use DragDetect() these days, or is it more common to
implement the functionality by hand?
Thanks,
-walter harley
Sounds like a really useful feature when you are trying to drag by only one
pixel. Otherwise you'd have to drag several pixels until detected and then
drag back, not knowing where it had been. Is there any reason you wish to
disable this behaviour? Generally it is better to use the system supplied
behaviour unless there is a really good reason. Personal preference is
definitely NOT a good reason.
If you still want to implement yourself, you can get the size of the drag
detect region using GetSystemMetrics and SM_CXDRAG or SM_CYDRAG.
Christian.