Article View: borland.public.cppbuilder.nativeapi
Article #9083Alter mouse coordinates in LowLevelMouseProc not working
From: Steve
Date: Fri, 30 Jul 2004 10:30
Date: Fri, 30 Jul 2004 10:30
35 lines
2072 bytes
2072 bytes
Hi Thanks for taking the time to read this. I've installed a WH_MOUSE_LL hook proc that's designed to simulate a multi-screen desktop. When the mouse reaches the right hand edge of my screen, I want to wrap the mouse back to the left side, hide the mouse and network the mouse data to a remote pc, where it is injected - thus making the screens look like they're controlled by a single mouse. My mouse proc is installed into the message chain correctly, using SetWindowsHookEx. I correctly detect when the mouse reaches the far right-hand edge of the screen. Once here, I set the X-coordinate to 0, and call SetCursorPos to alter the coordinates. The mouse jumps to the left hand edge of the screen, but now will not go any further right. Inspecting the coordinates I am putting onto my queue for networking to the remote pc, the X- coordinates climb, but are pulled back to the original coordinate that I set them to with SetCursorPos. Has anyone experienced this behaviour? I am returning -1 from my mouse hook proc when I wrap the coordinates because I don't want windows to process the mouse any further. Could this be affecting things? Thanks for your help! Regards Steve
Technical Details
Message-ID:
<410a2355$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,96208b54d1e68e42,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Steve" <steve@hgl-dynamics.n0sp4m.com> Sender: "Steve" <steve@hgl-dynamics.n0sp4m.com> Reply-To: "Steve" <steve@hgl-dynamics.n0sp4m.com> Subject: Alter mouse coordinates in LowLevelMouseProc not working Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 81.130.117.56 X-Forwarded-For: 192.1.0.48 NNTP-Posting-Host: 207.105.83.66 Message-ID: <410a2355$1@newsgroups.borland.com> Date: 30 Jul 2004 03:30:45 -0700 X-Trace: newsgroups.borland.com 1091183445 207.105.83.66 (30 Jul 2004 03:30:45 -0700) Lines: 35 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail