Exemplo n.º 1
0
        public static Point[] MapPoints([NotNull] this IWin32Window thisValue, [NotNull] Point[] points, IWin32Window newWin = null)
        {
            IntPtr hWndTo = newWin?.Handle ?? IntPtr.Zero;

            POINT[] pts = new POINT[points.Length];

            for (int i = 0; i < pts.Length; i++)
            {
                pts[i] = points[i].ToWin32Point();
                Win32.MapWindowPoints(thisValue.Handle, hWndTo, ref pts[i], 1);
            }

            return(pts.Select(e => e.ToPoint()).ToArray());
        }