Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6388835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:19:43+00:00 2026-05-25T03:19:43+00:00

I have a TreeView control on my form, and I’m recursively going through the

  • 0

I have a TreeView control on my form, and I’m recursively going through the elements of another window starting with the window itself. I’m using this to find the 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 quite well in most cases. The tree is populated and I have a bit of other supporting code allowing me to double click, for example, an element in the tree-view and it will highlight that element on the target form.

The issue I’m having is that, while it generates an awesome tree, there are still some elements missing for certain target programs.

What possible reason could there be for this, and is there any way to get around it?
If I call EnumChildWindows() from user32.dll will that have the same problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:19:44+00:00Added an answer on May 25, 2026 at 3:19 am

    Not all programs use separate windowed controls for all their logical children. Mostly this depends on the GUI framework used.

    As an extreme example, Qt uses a single window for each top-level window. It then paints all the widgets on the form from the form’s WM_PAINT message handler.

    Programs that take this approach are typically impossible to automate through generic methods.

    It sounds like you have encountered an application that uses some windowed controls but also uses custom controls with a single window for what appears to be multiple widgets. Again this is quite common.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Access 2007 form that is using an ActiveX Treeview control with
I have a TreeView control on a form. I am dynamically adding new TreeNodes
Hi all i have main form with a treeview control with a set of
I am attempting to show a specific form using a treeview control, the nodes
I have a treeview control on a windows form UI and it has a
I have a TreeView Control (that should look like this) But I don't know
In my C# Windows Form Application, I have Treeview control with checkboxes. I want
I have a TreeView control on my WPF window. I am giving only relevant
I have a treeview control in my web application. I build this tree view
I have a treeview control that functions like a folder browser. Because loading the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.