picea892 Posted May 11, 2009 Share Posted May 11, 2009 Hi again I'm wondering how I would go about getting the title or handle of the topmost non-active window under my mouse cursor. I would like to get this information in order to complete a drag and drop of a file. The window I would be dragging from and the window receiving the drag would both be autoit created (but run under seperate processes) if that matters to the solution. There has to be a way to do this but I'm at a loss. If I can't do this, then I'm stuck merging two listviews using onevent mode. I have problems using one, can't imagine two in one window..... Thanks for any help Picea Link to comment Share on other sites More sharing options...
Authenticity Posted May 11, 2009 Share Posted May 11, 2009 _WinAPI_WindowFromPoint(). ssamko 1 Link to comment Share on other sites More sharing options...
picea892 Posted May 11, 2009 Author Share Posted May 11, 2009 Ah...Excellent. I knew there had to be a way. I've meddled with these $tagPOINT structures before and am pretty sure I can muddle my way through the rest of this. Much appreciated. Thanks again. Picea Link to comment Share on other sites More sharing options...
picea892 Posted May 11, 2009 Author Share Posted May 11, 2009 Okay, I think I have it It appears that _WinAPI_WindowFromPoint() gets the handle of the control it is over (in the window it's hovering). So there were a couple more steps then I expected. So others who come searching, this is how I got the window title $pos = _WinAPI_GetMousePos() $hwnd = _WinAPI_WindowFromPoint($pos) $rer=_WinAPI_GetParent($hwnd) $rer2=WinGetTitle($rer) MsgBox(0,"",$rer2) 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