GetCapture

  HWND GetCapture(void)    

The GetCapture function retrieves the handle of the window that has the mouse capture, if any. Only one window can have the mouse capture at any given time; this window receives mouse input whether or not the mouse cursor is within its borders.

Parameters

This function has no parameters.

Return Value

The return value is the handle of the mouse-capture window associated with the current thread. If no window in the thread has the mouse capture, the return value is NULL.

Comments

A NULL return value does not mean no other thread or process in the system has the mouse capture; it just means the current thread does not have the mouse capture.

See Also

ReleaseCapture, SetCapture