urif
asked on
get the wincontrol under the mouse (system wide)
hi, i'm trying to identify the wincontrol that is under the mouse at any given time, for example: the caption, the scrollbar, a button, a form, etc.
i know how to do it locally, meaning in my own application with my own form and components, the thing is that i need to be able to do the same systemwide, if i move the mouse over the desktop then it should return "desktop" (or whatever the name is for the desktop object), etc.
the application that i am writing has already a mouse hook and i know where the mouse is at any given time.
any ideas? a code snippet would be great
thanks
i know how to do it locally, meaning in my own application with my own form and components, the thing is that i need to be able to do the same systemwide, if i move the mouse over the desktop then it should return "desktop" (or whatever the name is for the desktop object), etc.
the application that i am writing has already a mouse hook and i know where the mouse is at any given time.
any ideas? a code snippet would be great
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I wrote a clone of Win32Spy in delphi. I will post it later this evening.
ASKER
sorry for the delay, i was not able to access the internet.
thanks so much for the help!
thanks so much for the help!
?!
Go to Customer Service and ask that points be shifted to ZhaawZ.
I could not find my code and thus have not posted it and do not
deserve the points.
I could not find my code and thus have not posted it and do not
deserve the points.
ASKER
oops! so sorry, i already sent the request.
i thought that i gave the points to ZhaawZ but i guess i pressed the wrong button, again sorry.
hopefully the point will be passed onto ZhaawZ
i thought that i gave the points to ZhaawZ but i guess i pressed the wrong button, again sorry.
hopefully the point will be passed onto ZhaawZ
Thanks..
Then use GetClassName() to get class name of control (handle).
You may also use GetWindowText() or SendMessage() with wm_gettext as msg parameter to get caption/text of a control.