Partager via


CWindow::SetParent

Modifie la fenêtre parente.

HWND SetParent(
   HWND hWndNewParent 
) throw();

Notes

Consultez SetParent dans Kit de développement logiciel Windows.

Exemple

// The following example attaches a HWND to the CWindow object
// and sets the hWndParent as the parent window of the 
// window wrapped by CWindow object using CWindow::SetParent.

CWindow myWindow;
myWindow.Attach(hWndChild);
HWND hWndPrevParent = myWindow.SetParent(hWndParent);

Configuration requise

Header: atlwin.h

Voir aussi

Référence

Classe de CWindow

CWindow::GetParent