Export (0) Print
Expand All

ReleaseCapture function

Releases the mouse capture from a window in the current thread and restores normal mouse input processing. A window that has captured the mouse receives all mouse input, regardless of the position of the cursor, except when a mouse button is clicked while the cursor hot spot is in the window of another thread.

Syntax


BOOL WINAPI ReleaseCapture(void);

Parameters

This function has no parameters.

Return value

Type: BOOL

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

An application calls this function after calling the SetCapture function.

Examples

For an example, see Drawing Lines with the Mouse.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
GetCapture
SetCapture
WM_CAPTURECHANGED
Conceptual
Mouse Input

 

 

Community Additions

ADD
Show:
© 2014 Microsoft