Hi,
I want to hook every mouse l-click...
I'm using MS-VC++ 5.0. (MFC)
Please, help me.
Thanks!
Printable View
Hi,
I want to hook every mouse l-click...
I'm using MS-VC++ 5.0. (MFC)
Please, help me.
Thanks!
Let's assume you have created the application skeleton using classwizard and your project is loaded in workspace.
Run classwizard by typing CTRL-W.
Switch to the leftmost tab "Message Maps"
In the "Class name" combobox, select the window class for which you want to capture the click.
In the "Object IDs" listview, scroll to the bottom line, there will be name of the class you have selected in the combobox. Select it.
In the "messages" listview click on the message WM_LBUTTONDOWN.
Click on the button "Add function", then click on "Edit code". You will be transfered into function which will be called everytime the user click the left mouse button over your window. Place your code there.
Peter.
I need it for all windows: a system hook...
then just type "hooks" or "hook" in codeguru search section, you get what you want
Hello World!!!