User32DeferWindowPos Method

Updates the specified multiple-window – position structure for the specified window.

The function then returns a handle to the updated structure.

The DeferWindowPos(IntPtr, IntPtr, IntPtr, Int32, Int32, Int32, Int32, SetWindowPosFlags) function uses the information in this structure to change the position and size of a number of windows simultaneously. The BeginDeferWindowPos(Int32) function creates the structure.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)]
public static IntPtr DeferWindowPos(
	IntPtr hWinPosInfo,
	IntPtr hWnd,
	IntPtr hWndInsertAfter,
	int x,
	int y,
	int width,
	int heigth,
	SetWindowPosFlags flags
)

Parameters

hWinPosInfo  IntPtr
A handle to a multiple-window – position structure that contains size and position information for one or more windows.

This structure is returned by BeginDeferWindowPos(Int32) or by the most recent call to DeferWindowPos(IntPtr, IntPtr, IntPtr, Int32, Int32, Int32, Int32, SetWindowPosFlags).

hWnd  IntPtr
A handle to the window for which update information is stored in the structure.

All windows in a multiple-window – position structure must have the same parent.

hWndInsertAfter  IntPtr
A handle to the window that precedes the positioned window in the Z order.

This parameter is ignored if the IgnoreZOrder flag is set in the flags parameter.

x  Int32
The x-coordinate of the window's upper-left corner.
y  Int32
The y-coordinate of the window's upper-left corner.
width  Int32
The window's new width, in pixels.
heigth  Int32
The window's new height, in pixels.
flags  SetWindowPosFlags
Determine how affect the size and position of the window.

Return Value

IntPtr
If the function succeeds, the return value is .

If the function fails, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also