The DragDetect function 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. The width and height of the drag rectangle are specified by the SM_CXDRAG and SM_CYDRAG values returned by the GetSystemMetrics function.
BOOL DragDetect(
HWND hwnd,
POINT pt
);
If the user moved the mouse outside of the drag rectangle while holding the left button down, the return value is nonzero.
If the user did not move the mouse outside of the drag rectangle while holding the left button down, the return value is zero.
The system metrics for the drag rectangle are configurable, allowing for larger or smaller drag rectangles.
Windows NT: Requires version 4.0 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in winuser.h.
Import Library: Use user32.lib.
Mouse Input Overview, Mouse Input Functions, GetSystemMetrics