Exemple #1
0
        public static bool InverseAdjustWindowRectEx(
            ref Rectangle lpRect, WindowStyles dwStyle, bool hasMenu,
            WindowExStyles dwExStyle)
        {
            var rc  = new Rectangle();
            var res = User32Methods.AdjustWindowRectEx(ref rc, dwStyle, hasMenu, dwExStyle);

            if (res)
                Subtract(ref lpRect, ref rc); }
 public static void GetFullWindowRect(WindowStyles style, WindowExStyles styleEx, uint dpi, ref Rect rect)
 {
     if (IsWindows10AnniversaryUpdateOrGreaterWin32)
     {
         User32.AdjustWindowRectExForDpi(ref rect, style, false, styleEx, dpi);
     }
     else
     {
         User32.AdjustWindowRectEx(ref rect, style, false, styleEx);
     }
 }