GetWindowInfo() private method

private GetWindowInfo ( IntPtr hwnd, WINDOWINFO &pwi ) : bool
hwnd System.IntPtr
pwi WINDOWINFO
return bool
コード例 #1
0
        private void SaveWindowSize(Window wnd)
        {
            var info = new NativeMethods.WINDOWINFO();

            info.cbSize = (uint)Marshal.SizeOf(info);
            NativeMethods.GetWindowInfo((new WindowInteropHelper(wnd)).Handle, ref info);
            savedWidth  = info.rcWindow.Right - info.rcWindow.Left;
            savedHeight = info.rcWindow.Bottom - info.rcWindow.Top;
        }