 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
evl
Joined: 24 Aug 2005 Posts: 1239
|
Posted: Thu Apr 10, 2008 3:43 am Post subject: [solved] GetParent (dllcall) not finding some parent windows |
|
|
Here's an example script that shows the active window's parent when you Press F1. Any ideas why it wouldn't find a parent for the Winamp v 2.81 playlist editor window when Windowse http://www.greatis.com/delphicb/windowse/ reports that there is one (as expected)?
| Code: | F1::
DetectHiddenWindows, On
WinGet, wid, ID, A ; click in Winamp v2.81 playlist editor window first
Parent := Decimal_to_Hex( DllCall( "GetParent", "uint", wid ) )
msgbox, %Parent%
Return
Esc::exitapp
Decimal_to_Hex(var)
{
SetFormat, integer, hex
var += 0
SetFormat, integer, d
return var
} |
Last edited by evl on Sun Apr 13, 2008 9:42 am; edited 1 time in total |
|
| Back to top |
|
 |
evl
Joined: 24 Aug 2005 Posts: 1239
|
Posted: Sun Apr 13, 2008 9:29 am Post subject: |
|
|
Well I found the solution: The window doesn't have a parent, it has an owner.
| Code: | | Owner := Decimal_to_Hex( DllCall( "GetWindow", "uint", wid , "uint", "4" ) ) ; GW_OWNER = 4 |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|