◄CWnd► ◄Up► ◄Contents► ◄Index► ◄Back► ──Microsoft Foundation Classes────────────────────────────────────────────── void MoveWindow( int x, int y, int nWidth, int nHeight, BOOL bRepaint = TRUE ); void MoveWindow( LPRECT lpRect, BOOL bRepaint = TRUE ); Parameter Description <x> Specifies the new position of the left side of the window. <y> Specifies the new position of the top of the window. <nWidth> Specifies the new width of the window. <nHeight> Specifies the new height of the window. <bRepaint> Specifies whether the window is to be repainted. If this parameter is TRUE, the window is repainted. This is set by default. <lpRect> The CRect or ◄RECT► structure specifying the new size and position. Remarks Changes the position and dimensions. For a top-level CWnd object, the <x> and <y> parameters are relative to the upper-left corner of the screen. For a child CWnd object, they are relative to the upper-left corner of the parent window's client area. The MoveWindow function sends ◄WM_GETMINMAXINFO►. This gives CWnd the opportunity to modify the default values for the largest and smallest possible windows. If the parameters to the MoveWindow member function exceed these values, the values will be replaced by the minimum or maximum values specified in the WM_GETMINMAXINFO message. See Also ◄CWnd::SetWindowPos►, ◄::MoveWindow► -♦-