<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > UI (User Interface) > Windows API > Win_SetWindowPos |
Description
Changes the size, position, and Z order of a child, pop-up, or top-level window. These windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order.
Syntax
n = Win_SetWindowPos(hWnd, hWndInsertAfter, X, Y, CX, CY, Flags)
Returns
If the function succeeds, the return value is nonzero.
Parameters
Name |
Type |
Optional |
Meaning |
hWnd |
Number |
No |
Handle of the window |
hWndInsertAfter |
Number |
No |
A handle to the window to precede the positioned window in the Z order.
This parameter must be a window handle or one of the following values: %HWND_BOTTOM %HWND_TOP %HWND_TOPMOST |
X |
Number |
No |
The new position of the left side of the window, in client coordinates. |
Y |
Number |
No |
The new position of the top of the window, in client coordinates. |
CX |
Number |
No |
The new width of the window, in pixels. |
CY |
Number |
No |
The new height of the window, in pixels. |
Flags |
Number |
No |
See Microsoft documentation about meaning: %SWP_ASYNCWINDOWPOS %SWP_DEFERERASE %SWP_DRAWFRAME %SWP_FRAMECHANGED %SWP_HIDEWINDOW %SWP_NOACTIVATE %SWP_NOCOPYBITS %SWP_NOMOVE %SWP_NOOWNERZORDER %SWP_NOREDRAW %SWP_NOREPOSITION %SWP_NOSENDCHANGING %SWP_NOSIZE %SWP_NOZORDER %SWP_SHOWWINDOW |
Remarks
For additional info, please refer to MS documentation at: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos
Restrictions
See also
Examples