>>what I'm trying to do is to prevent windows(XP) from doing a MouseMove.
>>How I tried programming this is by making a message hook to intercept
>>the MouseMove messages by creating a hook to the WH_MOUSE_LL
>>messagequeue. Then I used DirectInput to get raw mouse data so I can
>>move the cursor by code, but with a speed I can control myself. Any
>>suggestions because when I install the message hook, windows still moves
>>my cursor, even if I do not pass the WM_MOUSEMOVE messages to the next
>>hook in the chain.
> I don't do mice, but I would think that MOVE message is a notification,
> not a request. IOW, Windows is telling that app the mouse has moved, it is
> not sending a request to move it.
> If I were looking to hold the cursor, or move it on demand, I would
> look at the ClipCursor API to restrict the mouse, and SetCursorPos to
> move it.
I think I found the sollution, because this seems to work: if you use a
WH_MOUSE_LL hook to catch the messages before they are sent to the
windows queue and I return 1 in the callback function so that windows
doesn't process the message anymore and then I use SetCursorPos to set
the cursor position. But thanks for the suggestions anyway,