You know the class because the first screenshot in post #14 tells you what it is: Qt5QWindow
. You know how many siblings because the second screenshot in post #14 shows you all the windows in the hierarchy and tells you their type, so you just look at the windows before the one you want and count how many have the same type. If your window of interest is the first of its type then you only need to call FindWindowEx
once. If there are siblings then you need to call it once more for each. If the top-level window is the direct parent then you call FindWindow
once to get that handle, then you call FindWindowEx
the requisite number of times. The first time you call FindWindowEx
, you don't specify a handle to search after. On each subsequent call, you specify the handle from the last call to search after. Once you get the first handle, you search after that to get the second and after that to get the third and so on.