CWindow::Detach
Desasocia m_hWnd del objeto de CWindow y establece m_hWnd a NULL.
HWND Detach( ) throw();
Valor devuelto
HWND asociado con el objeto de CWindow .
Ejemplo
//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();
Requisitos
encabezado: atlwin.h