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.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("User32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function DeferWindowPos (
hWinPosInfo As IntPtr,
hWnd As IntPtr,
hWndInsertAfter As IntPtr,
x As Integer,
y As Integer,
width As Integer,
heigth As Integer,
flags As SetWindowPosFlags
) As IntPtr
Dim hWinPosInfo As IntPtr
Dim hWnd As IntPtr
Dim hWndInsertAfter As IntPtr
Dim x As Integer
Dim y As Integer
Dim width As Integer
Dim heigth As Integer
Dim flags As SetWindowPosFlags
Dim returnValue As IntPtr
returnValue = User32.DeferWindowPos(hWinPosInfo,
hWnd, hWndInsertAfter, x, y, width,
heigth, flags)
public:
[DllImportAttribute(L"User32.dll", ExactSpelling = true, SetLastError = true)]
static IntPtr DeferWindowPos(
IntPtr hWinPosInfo,
IntPtr hWnd,
IntPtr hWndInsertAfter,
int x,
int y,
int width,
int heigth,
SetWindowPosFlags flags
)
[<DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)>]
static member DeferWindowPos :
hWinPosInfo : IntPtr *
hWnd : IntPtr *
hWndInsertAfter : IntPtr *
x : int *
y : int *
width : int *
heigth : int *
flags : SetWindowPosFlags -> IntPtr
No code example is currently available or this language may not be supported.
- 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.
IntPtr
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.