次の方法で共有


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 クラス

CWindow::GetParent