示例#1
0
 internal void ToNative(ref RECT rect)
 {
     rect.top = (int)Top;
     rect.bottom = (int)Bottom;
     rect.left = (int)Left;
     rect.right = (int)Right;
 }
示例#2
0
        internal static Position FromNative(ref RECT rect)
        {
            Position position = new Position()
            {
                Top = rect.top,
                Bottom = rect.bottom,
                Left = rect.left,
                Right = rect.right
            };
            position.Height = position.Bottom - position.Top;
            position.Width = position.Right - position.Left;

            return position;
        }
示例#3
0
 public static extern int GetWindowRect(IntPtr hwnd, out RECT rc);
示例#4
0
 public static RECT GetWindowRect(IntPtr handle)
 {
     RECT rect = new RECT();
     NativeMethods.GetWindowRect(handle, out rect);
     return rect;
 }