CWindow::Detach

Trennt m_hWnd vom CWindow-Objekt und legt m_hWnd zu NULL fest.

HWND Detach( ) throw();

Rückgabewert

HWND zugeordnet mit dem CWindow-Objekt.

Beispiel

//The following example attaches an HWND to the CWindow object and 
//later detaches the CWindow object from the HWND when no longer needed

CWindow myWindow;
myWindow.Attach(hWnd);

//call CWindow wrappers

//We don't need the C++ object any more, so detach it from the HWND.
myWindow.Detach(); 

Anforderungen

Header: atlwin.h

Siehe auch

Referenz

CWindow-Klasse

CWindow::Attach