Capturing mouse clicks and movements

New product: VCL components for displaying and controlling IP cameras, webcams, video conferencing, video chats
Post Reply
oliver
Posts: 30
Joined: Mon Aug 28, 2017 4:42 am

Capturing mouse clicks and movements

Post by oliver » Mon Jul 30, 2018 9:25 pm

Any suggestion on how to capture 1) mouse clicks and 2) mouse movements when capturing a window?

Sergey Tkachenko
Site Admin
Posts: 14117
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Capturing mouse clicks and movements

Post by Sergey Tkachenko » Tue Jul 31, 2018 3:59 pm

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 » Sun Aug 05, 2018 9:05 pm

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: 14117
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Capturing mouse clicks and movements

Post by Sergey Tkachenko » Mon Aug 06, 2018 3:41 pm

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