CWindow::Detach
中斷連結 CWindow 物件的 m_hWnd 並設定 m_hWnd 至 NULL。
HWND Detach( ) throw();
傳回值
HWND 與 CWindow 物件。
範例
//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