Grouping Windows based on creator

Achyuth Krishna 1 Reputation point
2021-09-28T19:23:08.477+00:00

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.

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
747 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 12,151 Reputation points Microsoft Vendor
    2021-09-29T03:02:45.61+00:00

    As you can see, Managing app windows provides a solution.

    0 comments No comments