SetParent

2.x

  HWND SetParent(hwndChild, hwndNewParent)    
  HWND hwndChild; /* handle of window whose parent is changing */
  HWND hwndNewParent; /* handle of new parent window */

The SetParent function changes the parent window of the given child window.

Parameters

hwndChild

Identifies the child window.

hwndNewParent

Identifies the new parent window.

Return Value

The return value is the handle of the previous parent window, if the function is successful.

Comments

If the window identified by the hwndChild parameter is visible, Windows performs the appropriate redrawing and repainting.

See Also

GetParent, IsChild