Skip to content

Latest commit

 

History

History
80 lines (58 loc) · 2.11 KB

SetWindowPos.md

File metadata and controls

80 lines (58 loc) · 2.11 KB

Home

Function name : SetWindowPos

Group: Window - Library: user32


The SetWindowPos function changes the size, position, and Z order of a child, pop-up, or top-level window.


Code examples:

Using Common Controls: the Header Control
Extended MessageBox Class
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
How to position the GETPRINTER() dialog
Displaying hypertext links with the SysLink control (VFP9, Comctl32.dll)
Using Month Calendar Control (VFP9, Comctl32.dll)
Displaying dimmed window behind VFP top-level form

Declaration:

BOOL SetWindowPos(
  HWND hWnd,             // handle to window
  HWND hWndInsertAfter,  // placement-order handle
  int X,                 // horizontal position
  int Y,                 // vertical position
  int cx,                // width
  int cy,                // height
  UINT uFlags            // window-positioning options
);  

FoxPro declaration:

DECLARE INTEGER SetWindowPos IN user32;
	INTEGER hwnd,;
	INTEGER hWndInsertAfter,;
	INTEGER x,;
	INTEGER y,;
	INTEGER cx,;
	INTEGER cy,;
	INTEGER wFlags
  

Parameters:

hWnd [in] Handle to the window.

hWndInsertAfter [in] Handle to the window to precede the positioned window in the Z order.

X [in] Specifies the new position of the left side of the window, in client coordinates.

Y [in] Specifies the new position of the top of the window, in client coordinates.

cx [in] Specifies the new width of the window, in pixels.

cy [in] Specifies the new height of the window, in pixels.

uFlags [in] Specifies the window sizing and positioning flags.


Return value:

If the function succeeds, the return value is nonzero.