Compartilhar via


CMDIFrameWnd::MDICascade

Arranges all the MDI child windows in a cascade format.

void MDICascade( ); 
void MDICascade( 
   int nType  
);

Parameters

  • nType
    Specifies a cascade flag. Only the following flag can be specified: MDITILE_SKIPDISABLED, which prevents disabled MDI child windows from being cascaded.

Remarks

The first version of MDICascade, with no parameters, cascades all MDI child windows, including disabled ones. The second version optionally does not cascade disabled MDI child windows if you specify MDITILE_SKIPDISABLED for the nType parameter.

Example

// CMainFrame::OnWindowCommand() is a menu command handler for 
// CMainFrame class, which is a CMDIFrameWnd-derived 
// class. It handles menu commands for the Windows pop-up menu. 
// Its entries in the message map are of the following form: 
//  ON_COMMAND_EX(ID_WINDOW_ARRANGE, &CMainFrame::OnWindowCommand)
BOOL CMainFrame::OnWindowCommand(UINT nID)
{   
   switch (nID)
   {
   case ID_WINDOW_ARRANGE:   // For Window\Arrange Icons menu item, arrange
      MDIIconArrange();     // all minimized document child windows. 
      break;

   case ID_WINDOW_CASCADE:  // For Window\Cascade menu item, arrange
      MDICascade();         // all the MDI child windows in a cascade format. 
      break;

   case ID_WINDOW_TILE_HORZ:       // For Window\Tile Horizontal menu item, 
      MDITile(MDITILE_HORIZONTAL); // tile MDI child windows so that 
      break;                       // one window appears above another. 

   case ID_WINDOW_TILE_VERT:       // For Window\Tile Vertical menu item, 
      MDITile(MDITILE_VERTICAL);   // tile MDI child windows so that 
      break;                       // one window appears beside another.

   }

   return TRUE;
}

Requirements

Header: afxwin.h

See Also

Reference

CMDIFrameWnd Class

Hierarchy Chart

CMDIFrameWnd::MDIIconArrange

CMDIFrameWnd::MDITile

WM_MDICASCADE