예제 #1
0
        public windowRect(IntPtr hWnd)
        {
            NativeMethods.GetWindowRect(hWnd, out this);
            windowRect delta = new windowRect();

            NativeMethods.AdjustWindowRectEx(ref delta, NativeMethods.GetWindowLong(hWnd, GWL_STYLE), false, NativeMethods.GetWindowLong(hWnd, GWL_EXSTYLE));
            left   -= delta.left;
            right  -= delta.right + 1;
            top    -= delta.top;
            bottom -= delta.bottom + 1;
        }
예제 #2
0
 internal static extern bool AdjustWindowRectEx(ref windowRect rect, int dwStyle, [MarshalAs(UnmanagedType.Bool)] bool bMenu, int dwExStyle);
예제 #3
0
 internal static extern bool GetWindowRect(IntPtr hWnd, out windowRect rect);