i usedto input a mouse click, but the code mouves the cursor. is there a way without moving the cursor?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));




Reply With Quote