Page 1 of 1

Capturing mouse clicks and movements

Posted: Mon Jul 30, 2018 9:25 pm
by oliver
Any suggestion on how to capture 1) mouse clicks and 2) mouse movements when capturing a window?

Re: Capturing mouse clicks and movements

Posted: Tue Jul 31, 2018 3:59 pm
by Sergey Tkachenko
See the demo in Demos\SendAnReceive\RemoteDesktop\
One application uses command to send mouse events to another application.

Re: Capturing mouse clicks and movements

Posted: Sun Aug 05, 2018 9:05 pm
by oliver
I looked at that demo, but it doesn't help me much. I need to capture the mouse clicks (and maybe movements) when capturing the window of ANY desktop application. I guess there are really 2 questions:
1) How do I know when another app gets a mouse click?
2) How do I "record" that into the video I am capturing?

Re: Capturing mouse clicks and movements

Posted: Mon Aug 06, 2018 3:41 pm
by Sergey Tkachenko
I never tried it myself, but it looks like you need to use SetWindowsHookEx to set a hook procedure for mouse events.
For example, see https://www.thoughtco.com/how-to-hook-the-mouse-1058467