win32gui.GetCapture

int = GetCapture()

Returns the window with the mouse capture.