mouse event

hi everybody . i have one question : how can i know where does mouse click ? for example if click on myComputer i understand clicked on myComputer ... ?
tnx
You'll need to look through the Windows API...that sort of stuff is a pain in C++. For stuff like that I use AutoHotKey. It takes a lot of the annoying stuff out of things like that.
i cant understand your means . sorry . please tell me more txn
Do you want to know where the mouse clicked? Or WHAT the mouse clicked? There is a significant difference.
sry i want what the mouse clicked ....
In that case short of writing something to spy on explorer.exe (Very Hard To Do, Easy To Spot Withou A Hook...) there is little you can do to see what a user has highlighted. But if what you want is to keep track of what the user has open then use the tlhelp32.h header to enumerate the running processes: http://msdn.microsoft.com/en-us/library/ms682489(v=VS.85).aspx
I find this set of functions very easy to use.
i worked with this function for processes but how to work with this for mouse event ?!!!
It's not for mouse events, my idea was to see what they clicked on based on what program they opened.

Alternativley may be able to record the mouse position when ever a "Click" message is sent but that gets complicated really quick so I advise against it.
Taking windows-wise, you could try WindowFromPoint(): http://msdn.microsoft.com/en-us/library/windows/desktop/ms633558(v=vs.85).aspx .
:)) WindowFromPoint is a very fantastic function tnx :D but doesnt my answer :(
Last edited on
Topic archived. No new replies allowed.