So, I tried directinput and GetCursorPos. I'm not sure what funcion I should choose.
Directinput - The main problem is with directinput, that it only has mouse delta position (position movement). In oder to, create mouse X/Y I need to create my own cursor position, but in the end I need windows position to be same as directinput and It's kind a headache. But it has one big plus that allows to have different cursor speed from windows at the same time.
GetCursorPos - The biggest plus it is very easy used especialy with ScreenToClient (that sets my coordinates that I get from GetCursorPos to client coordinates). And I have feeling that warcraft 3, world of warcraft, heroes of newarth using GetCursorPos. Why? I made few tests in windowed mode and I saw that they are effected by windows cursor speed, also they perfectly fallows windows cursor. Only world of warcraft has its own cursor speed, but I have feeling they only change windows cursor speed then u are at game.
By the way Somewhy my GetCursorPos doesn't follow perfectly my client cursor movement
//m_mouseX/Y my final client cursor coordinates
So any suggestions, ideas?
Directinput - The main problem is with directinput, that it only has mouse delta position (position movement). In oder to, create mouse X/Y I need to create my own cursor position, but in the end I need windows position to be same as directinput and It's kind a headache. But it has one big plus that allows to have different cursor speed from windows at the same time.
GetCursorPos - The biggest plus it is very easy used especialy with ScreenToClient (that sets my coordinates that I get from GetCursorPos to client coordinates). And I have feeling that warcraft 3, world of warcraft, heroes of newarth using GetCursorPos. Why? I made few tests in windowed mode and I saw that they are effected by windows cursor speed, also they perfectly fallows windows cursor. Only world of warcraft has its own cursor speed, but I have feeling they only change windows cursor speed then u are at game.
By the way Somewhy my GetCursorPos doesn't follow perfectly my client cursor movement
Code:
tagPOINT point;
GetCursorPos(&point);
ScreenToClient(hwnd, &point);
m_mouseX = point.x;
m_mouseY = point.y;
//m_mouseX/Y my final client cursor coordinates
So any suggestions, ideas?