Compartilhar via


CWindow::Detach

Dispara m_hWnd do objeto de CWindow e defina m_hWnd a NULO.

HWND Detach( ) throw();

Valor de retorno

HWND associado ao objeto de CWindow .

Exemplo

//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

Cabeçalho: atlwin.h

Consulte também

Referência

Classe de CWindow

CWindow::Attach