CWindow::SetParent

更改父窗口。

HWND SetParent( 
   HWND hWndNewParent  
) throw();

备注

在参见 Windows SDK的 SetParent

示例

// 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);

要求

Header: atlwin.h

请参见

参考

CWindow Class

CWindow::GetParent