Does Windows UI Automation not show all children?

I have a TreeView control in my form, and I recursively look at the elements of another window, starting from the window itself. I use this to find elements:

getRecursiveElements(AutomationElement parent)
{
  children = parent.FindAll(TreeScope.Children, Condition.TrueCondition);

  foreach (AutomationElement child in children)
  {
    addToTreeView(child);
    getRecursiveElements(child);
  }
}

Generally speaking, the code works pretty well in most cases. The tree is full, and I have a bit of other helper code that allows me to double-click, for example, an element in the tree view, and it will select that element in the target form.

The problem I am facing is that although it generates an amazing tree, there are still some elements that are missing for certain target programs.

What is the possible reason for this, and is there a way around this? If I call EnumChildWindows()from user32.dll, will you have the same problem?

+5
2

. .

Qt . WM_PAINT.

, , , .

, , , . , .

+3

, ? , , "" , .

0

All Articles