Beispiel #1
0
		void SendMouse(IntPtr hWnd, IContact contact, Action<IntPtr, POINT> action)
		{
			POINT point = new POINT((int)contact.X, (int)contact.Y);
			if(hWnd.Equals(IntPtr.Zero))
				hWnd = GetWindowAtPoint(point);

			NativeMethods.MapWindowPoints(IntPtr.Zero, hWnd, ref point, 1);

			if(hWnd != IntPtr.Zero)
				action(hWnd, point);
		}
Beispiel #2
0
		IntPtr GetWindowAtPoint(POINT point)
		{
			return NativeMethods.WindowFromPoint(point);
		}