CMDIFrameWnd::MDICascade

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

Call this member function to arrange all the MDI child windows in a cascade format.

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.
void CMainFrame::OnWindowCommand() 
{   
   // Get the message the window is currently processing. Since we are
   // in the OnMessage handler, the message we get back must be a 
   // WM_COMMAND message, and its low-order word of wParam is the ID of 
   // menu item being selected.
   const MSG* msg = GetCurrentMessage();

   switch (LOWORD(msg->wParam))
   {
   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.
      
   }
}

CMDIFrameWnd OverviewClass MembersHierarchy Chart

See Also   CMDIFrameWnd::MDIIconArrange, CMDIFrameWnd::MDITile, WM_MDICASCADE