GetWindowChildList not returning all child handles

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
MarcinW
Junior Coder
Posts: 24
Joined: Thu Jul 23, 2020 11:24 pm

GetWindowChildList not returning all child handles

Post by MarcinW » Tue Jun 11, 2024 11:24 am

Hi,

I'm using version 15.0.19 and SDK from around the time of that version release, I have lifetime licenses for both, so I'm not sure if it has been fixed in a newer version or not.

I rarely use GetWindowChildList so I'm not sure how often this issue occurs and if it's specific to the window I am trying to automate now.

The problem I have is that GetWindowChildList function does not return all child handles for me. It misses good chunk of them.

As a simplified example, let's say I have parent handle 10, and in the View System Windows tool I can see it has child handles 1, 2, 3

If I call GetWindowChildList for handle 10, it only returns 1 and 3, missing 2.
If I call FindObject passing parent handle 10, and the class name + index of the missing object, it does successfully find it and returns handle 2
If I call GetWindowParent passing handle 2 (return type 1), it does return handle 10.

Is anyone aware of this issue? Is this something that newer version fixed? Is there any workaround to this issue? I really need to get handles of all the child elements.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1369
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: GetWindowChildList not returning all child handles

Post by Dorian (MJT support) » Thu Jun 20, 2024 7:59 am

I've tested and can replicate this in the 15.0.24 too. It seems to see all the windows with captions but not ones without. I have passed this on to dev for investigation.
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts