For sending information about mouse events I'm using the function SendInput() but I don't what is going once I intialized the INPUT structure and send the event to Windows.
here a fragment of the code:
..... flg = MOUSEEVENTF_VIRTUALDESK | MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE; } if (flg > 0) { //logTest("MirrorPoller::handleMouseEvent", "SetCursor - flg > 0"); // //FIXME: move the cursor to the pace the event occurred // //SetCursorPos(event -> xbutton.x + x_, event -> xbutton.y + y_); long int moveX = (long int) ceil(((double)((event -> xmotion.x) + x_)) * 65536 / (double)width_); long int moveY = (long int) ceil((double)((event -> xmotion.y) + y_) * 65536 / (double)height_); pMouse_ -> mi.dx = moveX; pMouse_ -> mi.dy = moveY/; // // FIXME: Remove me: send the click/release event // mouse_event(flg, 0, 0, whl, (ULONG_PTR)NULL); // pMouse_ -> mi.dwFlags = flg; if (eventThreadService_ == 1) { addInputEvent(pMouse_); } else if (SendInput(1, pMouse_, sizeof(INPUT)) == 0) { logTest("MirrorPoller::handleMouseEvent", "Failed SendInput"); } .....
Anyone of you have a suggestion on what I should do for testing it, I'm trying to find same code sample on internet but anything came out, except this http://code.msdn.mic...Touch-f98db97e/ but I cannot copile it neither in VS 2013 nor VS 2012.
Or anyone of you can explain me what is going on, if you have an idea as well!
Thank you a lot.