As you can see, Managing app windows provides a solution.
Grouping Windows based on creator
Some applications have single PID with multi instanaces running Eg: Word or MS Teams
I need to automate UIA but hoe do i differentiate the windows created by a specific instance
Eg : on MS Teams I can have two Instances running under the same PID
Let us assume the instances are A and B
Now If I create a pop up From Instance A how do i associate the pop up to instance A and not to instance B ??
Given the window handle of the pop up I am unable to find the owner of the window that goes back to Either the window handle of A or B
One option is to hook onto the object create event and keep a list of all windows created but in case of MS Teams the second instance is launched from inside the first instance so it is both a second instance as well as a pop up/ sub window.
1 answer
Sort by: Most helpful
-
Xiaopo Yang - MSFT 12,726 Reputation points Microsoft Vendor
2021-09-29T03:02:45.61+00:00