다음을 통해 공유


CWindow::SetParent

부모 창으로 변경 됩니다.

HWND SetParent( 
   HWND hWndNewParent  
) throw();

설명

참조 SetParent 에 있는 Windows SDK.

예제

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

요구 사항

헤더: atlwin.h

참고 항목

참조

CWindow Class

CWindow::GetParent