Function:
SetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags)
|
Description:
Changes the size, position, and Z order of a window.
|
Parameters:
hWnd: handle of window.
hWndInsertAfter: Either the handle of the window to position this window
behind, or a flag stating where in the Z-order to put the window:
* -2 = Put the window below all topmost windows
and above all non-topmost windows.
* -1 = Make the window topmost (above all other windows) permanently.
* 0 = Put the window at the top of the Z-order.
* 1 = Put the window at the bottom of the Z-order.
X: The x coordinate of where to put the upper-left
corner of the window.
Y: The y coordinate of where to put the upper-left corner of the window.
cx: The x coordinate of where to put the lower-right corner of the window.
cy: The y coordinate of where to put the lower-right corner of the window.
uFlags: Zero or more of the following flags stating how to move the window:
* 32 = Fully redraw the window in its new position.
* 128 = Hide the window from the screen.
* 16 = Do not make the window active after moving it unless it was already
the active window.
* 256 = Do not redraw anything drawn on the window after it is moved.
* 2 = Do not move the window.
* 1 = Do not resize the window.
* 8 = Do not remove the image of the window in its former position, effectively
leaving a ghost image on the screen.
* 4 = Do not change the window's position in the Z-order.
* 64 = Show the window if it is hidden.
|
Returns:
Returns 1 if successful, or 0 if an error occurred.
|
Example: 
Click on the calc icon to view a sample of the SetWindowPos
function.
|