共用方式為


CMDIChildWnd::MDIDestroy

Call this member function to destroy an MDI child window.

void MDIDestroy( );

Remarks

The member function removes the title of the child window from the frame window and deactivates the child window.

Example

// CMainFrame::OnCloseWindow() is a menu command handler for
// CMainFrame class, which in turn is a CMDIFrameWnd-derived 
// class. It closes and destroys the current active MDI child window. 
void CMainFrame::OnCloseWindow() 
{
   CMDIChildWnd* child = MDIGetActive();
   if (child)
      child->MDIDestroy();
}

Requirements

Header: afxwin.h

See Also

Reference

CMDIChildWnd Class

Hierarchy Chart

WM_MDIDESTROY

CMDIChildWnd::Create

Other Resources

CMDIChildWnd Members