<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Disconnecting mouse cursor from mouse in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980236#M25918</link>
    <description>Well, I tried it myself (approach 1). It looks as if ClipCursor is not necessary (and it didn't work well in my program since I got a sluggish response). The algorithm is approximately: &lt;BR /&gt; &lt;BR /&gt;- When an action "enter fixed-cursor mode" occurs, store original mouse X/Y. Reset a pair iAccX/iAccY (accumulated) to zero. Original X/Y and iAccX/Y should have SAVE attribute.&lt;BR /&gt; &lt;BR /&gt;- When mouse moves in that mode, add the difference of current position and original X/Y to iAccX/iAccY. That tells you how much the user moved the mouse (on mousepad). Do something with that. Call ClientToScreen and SetCursorPos to move the cursor back to original X/Y.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;That caused the cursor to vibrate slightly (since my "Do something" was a rather long operation); I don't know whether something could be done about it. &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
    <pubDate>Mon, 21 Jan 2002 22:02:20 GMT</pubDate>
    <dc:creator>Jugoslav_Dujic</dc:creator>
    <dc:date>2002-01-21T22:02:20Z</dc:date>
    <item>
      <title>Disconnecting mouse cursor from mouse</title>
      <link>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980232#M25914</link>
      <description>I want to read mouse input without the cursor moving. How I do this from &lt;BR /&gt;a QuickWin program? Also can I set the cursor position by program?</description>
      <pubDate>Tue, 15 Jan 2002 22:39:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980232#M25914</guid>
      <dc:creator>alfredodell</dc:creator>
      <dc:date>2002-01-15T22:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Disconnecting mouse cursor from mouse</title>
      <link>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980233#M25915</link>
      <description>Use the following to get mouse position: &lt;BR /&gt;&lt;PRE&gt; 
USE DFWIN 
TYPE(T_POINT):: PT 
iSt = GetCursorPos(PT) 
iSt = ScreenToClient(GETHWNDQQ(YourWindow), PT). 
iX = PT%x 
iY = PT%y 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;ScreenToClient converts from screen-coordinates into YourWindow-relative coordinates. To set position, use SetCursorPos (and ClientToScreen if necessary). &lt;BR /&gt;Additionally, you can check status of mouse button (or any key from keyboard) &lt;BR /&gt;using: &lt;BR /&gt;&lt;PRE&gt; 
IF (IAND(GetKeyState(MK_LBUTTON), #8000).NE.0) THEN !Left button pressed 
&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Wed, 16 Jan 2002 23:52:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980233#M25915</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2002-01-16T23:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Disconnecting mouse cursor from mouse</title>
      <link>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980234#M25916</link>
      <description>I have no problem with reading mouse cursor position (I am doing it by &lt;BR /&gt;intercepting messages to the window).  The problem lies in preventing mouse &lt;BR /&gt;position change information from updating the mouse cursor whilst being &lt;BR /&gt;able to read the change information to enable me to control program behaviour.</description>
      <pubDate>Mon, 21 Jan 2002 00:43:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980234#M25916</guid>
      <dc:creator>alfredodell</dc:creator>
      <dc:date>2002-01-21T00:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Disconnecting mouse cursor from mouse</title>
      <link>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980235#M25917</link>
      <description>Ah, I see -- you want the pointer to stay fixed while user is moving the mouse and &lt;B&gt;read&lt;/B&gt; that moving? Well, I know half of the answer -- use ClipCursor to fix the cursor to a certain point (don't forget to call it again with NULL parameter to restore normal behaviour). &lt;BR /&gt; &lt;BR /&gt;As for catching mouse events in that state -- I don't know. Two ideas come to my mind: &lt;BR /&gt; &lt;BR /&gt;1) ClipCursor to a 3x3 points region. When WM_MOUSEMOVE arrives, check where it actually moved (up/down, left/right) and after processing reset its position back to the center using SetCursorPos. In this way you should receive a series of "micro" moves which you could track and process. &lt;BR /&gt; &lt;BR /&gt;2) If it fails, try installing a low-level mouse hook (SetWindowsHookEx(WH_MOUSE_LL)) (NT/2000/XP only). See a sample on instaling hook (search for SetWindowsHookEx in the Forum). Take a look into SetWindowsHookEx and LowLevelMouseProc in Win32 SDK docs. &lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Mon, 21 Jan 2002 07:54:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980235#M25917</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2002-01-21T07:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: Disconnecting mouse cursor from mouse</title>
      <link>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980236#M25918</link>
      <description>Well, I tried it myself (approach 1). It looks as if ClipCursor is not necessary (and it didn't work well in my program since I got a sluggish response). The algorithm is approximately: &lt;BR /&gt; &lt;BR /&gt;- When an action "enter fixed-cursor mode" occurs, store original mouse X/Y. Reset a pair iAccX/iAccY (accumulated) to zero. Original X/Y and iAccX/Y should have SAVE attribute.&lt;BR /&gt; &lt;BR /&gt;- When mouse moves in that mode, add the difference of current position and original X/Y to iAccX/iAccY. That tells you how much the user moved the mouse (on mousepad). Do something with that. Call ClientToScreen and SetCursorPos to move the cursor back to original X/Y.&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;That caused the cursor to vibrate slightly (since my "Do something" was a rather long operation); I don't know whether something could be done about it. &lt;BR /&gt; &lt;BR /&gt;Jugoslav</description>
      <pubDate>Mon, 21 Jan 2002 22:02:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980236#M25918</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2002-01-21T22:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Disconnecting mouse cursor from mouse</title>
      <link>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980237#M25919</link>
      <description>Using SetCursorPos seem to solve the problem nicely!</description>
      <pubDate>Wed, 23 Jan 2002 03:57:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Disconnecting-mouse-cursor-from-mouse/m-p/980237#M25919</guid>
      <dc:creator>alfredodell</dc:creator>
      <dc:date>2002-01-23T03:57:32Z</dc:date>
    </item>
  </channel>
</rss>

