r84170 Posted November 10, 2008 Posted November 10, 2008 (edited) In general: How can I check if an object is covered by a window? Example: Someone moves a window over another window or control. Is there a function? Special problem: I want check if a systray-icon will cover by a window. But how can i get this information? The normal und UDF does not work. Who can help? Edited November 12, 2008 by r84170
LarryDalooza Posted November 10, 2008 Posted November 10, 2008 The control "ToolbarWindow321" of the window "CLASS:Shell_TrayWnd" is the systray... Get it's WinGetPos/ControlGetPos ... a.k.a. find out where it exists on the screen. Do a WindowFromPoint() on some of the coords where it exists. If WindowFromPoint() comes back with the HWND of the "ToolbarWindow321" then nothing is covering it... It's all there /\ ... just have to try and error. Lar. AutoIt has helped make me wealthy
Bert Posted November 10, 2008 Posted November 10, 2008 usually the window on top is the active window. Try WinActive The Vollatran project My blog: http://www.vollysinterestingshit.com/
r84170 Posted November 12, 2008 Author Posted November 12, 2008 (edited) solution #2 works fine! thank you. My example: #Include <WinAPI.au3> ;.... ;Create $tagPoint structure Local $tPoint= DllStructCreate("int X;int Y") DllStructSetData($tpoint, "X", 1174) DllStructSetData($tpoint, "Y", 1009) ; endless loop for example While 1 $result= _WinAPI_WindowFromPoint($tPoint) ConsoleWrite("Return win handle: " & $result & @CR) sleep(200) WEnd Edited November 12, 2008 by r84170 BigDaddyO 1
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