CWindow::Detach

分离 CWindow 对象的 m_hWnd 并将 m_hWndNULL

HWND Detach( ) throw();

返回值

HWNDCWindow 对象。

示例

//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(); 

要求

Header: atlwin.h

请参见

参考

CWindow选件类

CWindow::Attach