CWindow::DestroyWindow
Уничтожает окно, связанное с объектом CWindow и задает m_hWnd к NULL.
BOOL DestroyWindow( ) throw();
Заметки
См. раздел DestroyWindow в Windows SDK.
Он не уничтожает объект самого CWindow.
Пример
//The following example attaches an HWND to the CWindow object and
//calls CWindow::DestroyWindow() to destroy the window
CWindow myWindow;
myWindow.Attach(hWndChild);
//call the CWindow wrappers
myWindow.DestroyWindow();
hWndChild = NULL;
Требования
Header: atlwin.h