Get synchronization!

Started by
3 comments, last by Flimflam 18 years, 4 months ago
i use a texture for the mouse instead of the system's,but i find that they are not synchronization,when i use getcursor funtion . how to make them synchronization?
Advertisement
Well you need to transform the mouse movement in screen coordinates.
If you want to use Win32Api you should catch the WM_MOUSEMOVE message in the WndProc function. Your code should look like this:
case WM_MOUSEMOVE:
{
xmouse = LOWORD(lParam);
ymouse = HIWORD(lParam);
}

If you want to use DirectInput, there is a tutorial on this on 32Bits site.

My project`s facebook page is “DreamLand Page”

this method i have tried.but they are still not synchronization.
Quote:Original post by leonlylin
this method i have tried.but they are still not synchronization.


What do you mean when you say there is no sincronization?
Could you provide more details?

My project`s facebook page is “DreamLand Page”

What he means is, at least by my understanding as I had this problem, is when you use a textured cursor in DirectX and rely on Windows to tell you when the mouse is moved, there is a smooth delay in when your program updates the position of the cursor texture on the screen.

So, following the steps

1. User Moves Mouse
2. Shortly after (not instantly), the mouse will move on the screen.

It's an annoying little thing. I never did solve it.

This topic is closed to new replies.

Advertisement