setting the mouse cursor where you want it isn't as simple as setting mousex and mousey with mouse/keyboard. those actions set the cursor to screen coordinates, meaning the coordinates on your monitor, which have nothing to do with the game.
to set the mouse coordinates to a spot in your game, you need to take into account where the window is on the screen, how far into your layout you are scrolled, and how zoomed in you are. there is a formula you can use, and it's demonstrated in the following cap:
when you run the cap, mousewheel zooms in and out, and since your mouse is hijacked and you can't reach the close button, hit escape to exit