After many searches, I can't find a way to get the active window (on windows desktop) or even all visible windows. All user32 methods have problems :
GetForegroundWindowgets the topmost if there is one.GetActiveWindowonly works for windows inside my app.IsWindowVisiblereturn true for windows opened but hidden by other windows.GetFocusonly works if there is input field.
How can I do ?