次の方法で共有


CWindow::Attach

CWindow のオブジェクトに hWndNew で識別されるペインをアタッチします。

void Attach(
   HWND hWndNew 
) throw();

パラメーター

  • hWndNew
    [出力]ウィンドウのハンドル。

使用例

//The following example attaches an HWND to the CWindow object
HWND hWnd  = ::GetDesktopWindow();
CWindow myWindow;
myWindow.Attach(hWnd);

必要条件

Header: atlwin.h

参照

関連項目

CWindow クラス

CWindow::Detach