BeMDI SDK
left  2. Create a window and a menubar right  4. Add a MDI view menu up  Tutorial Index
3. Add a MDI client view your window

Before we can display any MDI views in our window, we will need a MDI client view. The client view needs to be target of a BScrollView. Normally the scrollbars of the scroll view are hidden. But as soon the user moves a MDI view outside the visible client area the scrollbars are displayed and the user can scroll the client area.

CExampleWindow::CExampleWindow(...)
{
    ....

    BRect clientRect(0, menuBar->Bounds().Height() + 1,
                frame.Width()-B_V_SCROLL_BAR_WIDTH,
                frame.Height()-B_H_SCROLL_BAR_HEIGHT);

    CMDIClientView *client = new CMDIClientView(clientRect,
    "ClientView");

    BScrollView *scrollView = new BScrollView("MDIScroller", client,
        B_FOLLOW_ALL, 0, true, true, B_NO_BORDER);
        
    AddChild(scrollView);
}

  Top


© 2000 by 3rd-evolution