Sign in to follow this  
Followers 0
zhaicheng

How to get the parent window's handle

5 posts in this topic

How to get the parent window's handle ?

I have a program which pop up a window like "msgbox". I want to catch its parent window handle.

Many thanks!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

_WinAPI_GetAncestor

Edit:

That's the one I use, however you could also use _WinAPI_GetParent, but it will only get the immediate parent, so if you have GUI's within GUI's you won't get the "Mother" that spawned the rest without _WinAPI_GetAncestor.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

_WinAPI_GetAncestor

I didn't even know that one existed, shouldn't it be in the related-section for _WinAPI_GetParent (and vice versa)? I will make a ticket on that.

Edit: #1890

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

I didn't even know that one existed, shouldn't it be in the related-section for _WinAPI_GetParent (and vice versa)? I will make a ticket on that.

As I'm sure you know, that's what happens when you go through all the api calls on a MSDN page just to make sure there's nothing else you'd like to use.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

SmOke_N ,AdmiralAlkex ,I really appreciate all your kind help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0