public static Standard.RECT AdjustWindowRectEx(Standard.RECT lpRect, Standard.WS dwStyle, bool bMenu, Standard.WS_EX dwExStyle) { if (!_AdjustWindowRectEx(ref lpRect, dwStyle, bMenu, dwExStyle)) { Standard.HRESULT.ThrowLastError(); } return(lpRect); }
public static IntPtr CreateRectRgnIndirect(Standard.RECT lprc) { IntPtr ptr = _CreateRectRgnIndirect(ref lprc); if (IntPtr.Zero == ptr) { throw new Win32Exception(); } return(ptr); }
public override bool Equals(object obj) { try { Standard.RECT rect = (Standard.RECT)obj; return((((rect._bottom == this._bottom) && (rect._left == this._left)) && (rect._right == this._right)) && (rect._top == this._top)); } catch (InvalidCastException) { return(false); } }
public static Standard.RECT Union(Standard.RECT rect1, Standard.RECT rect2) { return(new Standard.RECT { Left = Math.Min(rect1.Left, rect2.Left), Top = Math.Min(rect1.Top, rect2.Top), Right = Math.Max(rect1.Right, rect2.Right), Bottom = Math.Max(rect1.Bottom, rect2.Bottom) }); }
private static extern bool _GetWindowRect(IntPtr hWnd, out Standard.RECT lpRect);
private static extern bool _GetClientRect(IntPtr hwnd, out Standard.RECT lpRect);
private static extern IntPtr _CreateRectRgnIndirect([In] ref Standard.RECT lprc);
private static extern bool _AdjustWindowRectEx(ref Standard.RECT lpRect, Standard.WS dwStyle, [MarshalAs(UnmanagedType.Bool)] bool bMenu, Standard.WS_EX dwExStyle);