HWND GetCapture( )
This function retrieves a handle that identifies the window that has the mouse capture. Only one window has the mouse capture at any given time; this window receives mouse input whether or not the cursor is within its borders.
This function has no parameters.
The return value identifies the window that has the mouse capture; it is NULL if no window has the mouse capture.
A window receives the mouse capture when its handle is passed as the hWnd parameter of the SetCapture function.