How to catch keyboard and mouse events of all windows?
-
Hello, I wonder if i can catch all mouse and keyboard events of all windows from a hidden application in VC++/MFC. For example, i want to do special things if some key pairs are pressed (like in macro magic). Mustafa Demirhan
-
Hello, I wonder if i can catch all mouse and keyboard events of all windows from a hidden application in VC++/MFC. For example, i want to do special things if some key pairs are pressed (like in macro magic). Mustafa Demirhan
Usualy you must obtain messages from windows and you could do this by "subclassing" every process. For more informations read in MSDN.(try a serch using "Subclassing Windows" and you will find some TehnicalArticles usefull enough about this) regards, /REMUS
-
Hello, I wonder if i can catch all mouse and keyboard events of all windows from a hidden application in VC++/MFC. For example, i want to do special things if some key pairs are pressed (like in macro magic). Mustafa Demirhan
You will need to use SetWindowHook. Hooking can be rather complex, so be sure to read the documentation on it carefully.
-
Usualy you must obtain messages from windows and you could do this by "subclassing" every process. For more informations read in MSDN.(try a serch using "Subclassing Windows" and you will find some TehnicalArticles usefull enough about this) regards, /REMUS
-
Hello, I wonder if i can catch all mouse and keyboard events of all windows from a hidden application in VC++/MFC. For example, i want to do special things if some key pairs are pressed (like in macro magic). Mustafa Demirhan
Most all documentation relevant to SetWindowsHookEx is listed in: http://home.socal.rr.com/samhobbs/VC/Hooks.html It is definitely advanced stuff and I think that anyone attempting to implement such stuff need to expect to spend at least two weeks, probably a month learning what needs to be learned to be able to use the capability and related things effectively, safely and efficiently.