win32gui.GetFocus

GetFocus()

Returns the HWND of the window with focus.