Capturing mouse clicks and movements

RVMedia support and discussion (components for displaying and controlling IP cameras, webcams, video conferencing, video chats, recording audio and video files)
Post Reply
oliver
Posts: 30
Joined: Mon Aug 28, 2017 4:42 am

Capturing mouse clicks and movements

Post by oliver »

Any suggestion on how to capture 1) mouse clicks and 2) mouse movements when capturing a window?
Sergey Tkachenko
Site Admin
Posts: 17236
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Capturing mouse clicks and movements

Post by Sergey Tkachenko »

See the demo in Demos\SendAnReceive\RemoteDesktop\
One application uses command to send mouse events to another application.
oliver
Posts: 30
Joined: Mon Aug 28, 2017 4:42 am

Re: Capturing mouse clicks and movements

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17236
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Capturing mouse clicks and movements

Post 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
Post Reply