Hey there,

The following code works and is compiling properly in VS 2010 -- But my problem is that I would like to get it working in lite-c...

I'm not really sure where to start though, as lite-c does not support or have a lot of what I am using.. I don't think lite-c has the 'new' or 'delete' operators (Which I am using inefficiently, but I need them none the less). Also, many of the structs are not defined in windows.h.. along with the the integral function 'SendInput'..

How would I go about this task? any help is greatly appreciated smile

Code:
#include <windows.h>

void mouseMove(int dx, int dy)
{
   INPUT* input = new INPUT;
	 
   input->type = INPUT_MOUSE;
	 
   input->mi.dx = dx;
   input->mi.dy = dy;
   input->mi.mouseData = 0;
   input->mi.dwFlags = MOUSEEVENTF_MOVE;
   input->mi.time = 0;
   input->mi.dwExtraInfo = 0;
 
   SendInput(1, input, sizeof(INPUT));
   delete input;
}

int main(int argc, _TCHAR* argv[])
{
	while(1)
	{
		mouseMove(4,0);
		mouseMove(0,4);
		mouseMove(-4,0);
		mouseMove(0,-4);
	}
	return 0;
}



Some links:
SendInput
A forum post (3rd last post on that page)

Thanks in advance...

Last edited by the_mehmaster; 12/15/10 04:39.