Поделиться через


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

Требования

Header: atlwin.h

См. также

Ссылки

CWindow Class

CWindow::GetParent