CWindow::Attach

void Attach( HWND hWndNew );

Parameters

hWndNew

[in] The handle to a window.

Remarks

Attaches the window identified by hWndNew to the CWindow object.

Example

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

CWindow OverviewClass Members

See Also   CWindow::Detach