public bool ScreenToClientInPlace(ref User32Rect rect) { unsafe { fixed(User32Rect *lpRect = &rect) { User32Point *lpPoint = (User32Point *)lpRect; if (!User32APIs.ScreenToClient(Hwnd, lpPoint)) { return(false); } return(User32APIs.ScreenToClient(Hwnd, lpPoint + 1)); } } }
public static extern int MapWindowPoints(IntPtr hwnd, IntPtr hWndTo, User32Point *lpPoint, uint nCount);
public static extern bool ScreenToClient(IntPtr hwnd, User32Point *lpPoint);
public static extern bool ClientToScreen(IntPtr hwnd, User32Point *lpPoint);