I'm creating some automation utils.
Part of it is automating mouse input.
I think I have my math wrong because the X coordidnate is incorrect at certain points for example is I give it x = 114 which should translate to 114 pixels from left of screen (0) it will not move there, and a few others.
Y is always correct.
here is code which I believe must be wrong math.
int SCREEN_WIDTH = GetSystemMetrics( SM_CXVIRTUALSCREEN );//correct int SCREEN_HEIGHT = GetSystemMetrics( SM_CYVIRTUALSCREEN );//correct MInput.dx = (x * (65536 / SCREEN_WIDTH)); MInput.dy = (y * 65536 / SCREEN_HEIGHT);
I've tried all kinds with my braces and casts and what not.
It's driving me mad.