Freigeben über


CWindow::DestroyWindow

Destroys the window associated with the CWindow object and sets m_hWnd to NULL.

BOOL DestroyWindow( ) throw();

Remarks

See DestroyWindow in the Windows SDK.

It does not destroy the CWindow object itself.

Example

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

Requirements

Header: atlwin.h

See Also

Concepts

CWindow Class

CWindow Members