Quote Originally Posted by dave2k
i used
Code:
  double fScreenWidth    = ::GetSystemMetrics( SM_CXSCREEN )-1; 
  double fScreenHeight  = ::GetSystemMetrics( SM_CYSCREEN )-1; 
  double fx = pt.x*(65535.0f/fScreenWidth);
  double fy = pt.y*(65535.0f/fScreenHeight);
  INPUT  Input={0};
  Input.type      = INPUT_MOUSE;
  Input.mi.dwFlags  = MOUSEEVENTF_MOVE|MOUSEEVENTF_ABSOLUTE|MOUSEEVENTF_LEFTDOWN;
  Input.mi.dx = fx;
  Input.mi.dy = fy;
  ::SendInput(1,&Input,sizeof(INPUT));
to input a mouse click, but the code mouves the cursor. is there a way without moving the cursor?
If you don’t want to move the cursor why you are passing the MOUSEEVENTF_MOVE flag?
Simply omit it.

Anyway look at this FAQ.

Cheers