Udostępnij za pośrednictwem


CWnd::OnDestroy

The framework calls this member function to inform the CWnd object that it is being destroyed.

afx_msg void OnDestroy( );

Remarks

OnDestroy is called after the CWnd object is removed from the screen.

OnDestroy is called first for the CWnd being destroyed, then for the child windows of CWnd as they are destroyed. It can be assumed that all child windows still exist while OnDestroy runs.

If the CWnd object being destroyed is part of the Clipboard-viewer chain (set by calling the SetClipboardViewer member function), the CWnd must remove itself from the Clipboard-viewer chain by calling the ChangeClipboardChain member function before returning from the OnDestroy function.

Requirements

Header: afxwin.h

See Also

Concepts

CWnd Members

Reference

CWnd Class

Hierarchy Chart

CWnd::ChangeClipboardChain

CWnd::DestroyWindow

CWnd::SetClipboardViewer