开发者

Cloning and modifying mouse/stylus events without hijacking the cursor in C#?

开发者 https://www.devze.com 2023-04-11 15:21 出处:网络
I\'ve tried to put this into words but I figured an image would be easier to understand. Let us imagine that the white background is the desktop. The first black circle is one application window, the

I've tried to put this into words but I figured an image would be easier to understand. Let us imagine that the white background is the desktop. The first black circle is one application window, the second belongs to another application. Let's call the first one DEST and the second SOURCE. The red circle is the actual mouse pointer while the blue is the simulated one. Now for the questions:

1) How do I di开发者_JAVA百科spatch simulated mouse AND stylus events (example: actual cursor moves left while the simulated cursor (blue) moves in the opposite direction) ? Is there some class like Java's Robot for dispatching both mouse AND stylus events or will I have to go through wintab.dll for that?

2) How do I do this WITHOUT hijacking the actual cursor (multiple mouse input devices!?) ?

Cloning and modifying mouse/stylus events without hijacking the cursor in C#?


I'd think that you could P/Invoke SendMessage to send a WM_MOUSEMOVE or WM_LBUTTONDOWN to the DEST window, it's getting it in the right place that's more difficult. Following might help:

http://michaelsync.net/2006/07/04/sendmessage-c
http://www.codeguru.com/forum/showthread.php?t=337002

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号