zhaicheng Posted March 3, 2011 Share Posted March 3, 2011 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! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 3, 2011 Moderators Share Posted March 3, 2011 (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 March 3, 2011 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. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted March 3, 2011 Share Posted March 3, 2011 (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 March 3, 2011 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 3, 2011 Moderators Share Posted March 3, 2011 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. Link to comment Share on other sites More sharing options...
zhaicheng Posted March 5, 2011 Author Share Posted March 5, 2011 SmOke_N ,AdmiralAlkex ,I really appreciate all your kind help. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now