TWidgetSet.SetWindowPos
Changes the size, position, and Z order of a window.
Declaration
Source position: winapih.inc line 268
public function TWidgetSet.SetWindowPos( |
hWnd: HWND; |
hWndInsertAfter: HWND; |
X: Integer; |
Y: Integer; |
cx: Integer; |
cy: Integer; |
uFlags: UINT |
):Boolean; virtual; |
Arguments
hWnd |
|
The window handle. |
hWndInsertAfter |
|
The window handle or Z order position. |
X |
|
The window origin. |
Y |
|
The window origin. |
cx |
|
The window extent. |
cy |
|
The window extent. |
uFlags |
|
General placement flags. |
Function result
Zero on failure.
Description
The Z order can be changed to just behind another window, or:
- HWND_BOTTOM - behind all other windows.
- HWND_NOTOPMOST - behind all topmost windows.
- HWND_TOP - above all other windows.
- HWND_TOPMOST - above all other non-topmost windows.
The general placement can be a combination of:
- SWP_ASYNCWINDOWPOS - don't block the calling thread when the window is owned by an different thread.
- SWP_DEFERERASE - suppress WM_SYNCPAINT message.
- SWP_DRAWFRAME - draw the window frame.
- SWP_FRAMECHANGED - apply new frame style.
- SWP_HIDEWINDOW - hides the window.
- SWP_NOACTIVATE - don't activate the window.
- SWP_NOCOPYBITS - invalidate the entire client area. If not set, the window content moves together with the window.
- SWP_NOMOVE - the position is not changed (ignores X, Y).
- SWP_NOREPOSITION, SWP_NOOWNERZORDER - the Z order of the owner window is unchanged.
- SWP_NOREDRAW - nothing is redrawn automatically, not even uncovered parts of the window.
- SWP_NOSENDCHANGING - no WM_WINDOWPOSCHANGING message.
- SWP_NOSIZE - the size is unchanged (ignores cx, cy).
- SWP_NOZORDER - the Z order is unchanged (ignores hWndInsertAfter)
- SWP_SHOWWINDOW - unhide the window.