CWnd::SetWindowPos

This method changes the size, position, and z-order of child, pop-up, and top-level windows.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

BOOL SetWindowPos ( const CWnd* pWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags );

Remarks

If this is a visible top-level window, and you do not specify the SWP_NOACTIVATE flag in the nFlags parameter, this method will activate the window. If this is the currently active window, and you specify either the SWP_NOACTIVATE flag or the SWP_HIDEWINDOW flag, the activation is passed on to another visible top-level window.

When you set the SWP_FRAMECHANGED flag in the nFlags parameter, Windows CE redraws the entire non-client area of the window, which may change the size of the client area.

Windows CE 1.0 does not support the HWND_TOPMOST and HWND_NOTOPMOST constants in the hwndInsertAfter parameter, or the SWP_DRAWFRAME or SWP_NOCOPYBITS flags in the fuFlags parameter.