Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtTabPageContainerFlatWnd as view in MDI Collapse All
Subject Author Date
Ed Kennedy Dec 12, 2005 - 7:05 PM

The app I’m starting on is a MDI app.  Each view needs 4 tabs.  Would you have any samples that could get me started?

 

New sample with skins is SLICK!  Thanks!

Technical Support Dec 13, 2005 - 10:52 AM

You wrote: "Each view needs 4 tabs". So, we guess you plan to several types of views. Please let us know whether the MFC’s document/view architecture is needed?

There are three ways to implement multi-view and/or multi-tab UI with Prof-UIS:

1) use MDI project and implement everything as an independent document/view.

2) use SDI project with Prof-UIS tab page container as the main view window and implement all other windows and tab pages.

3) use the project of type 1 or 2 and implement other windows as childs of Prof-UIS dynamic resizable bars. This is how it is done in Visual Studio .NET/2005. Any dynamic resizable control bar can be switched into the MDI document mode or into a child page in an SDI application. Your users may not even guess that the views are really dynamic resizable bars in the document mode. Everything will be able to be docked, floating or having a look of classic document/view. This approach is used in SDI_DynamicBars, MDI_DynamicBars and new Skinable sample applications.

Please provide us with more details to let us advise you the appropriate solution.

Ed Kennedy Dec 13, 2005 - 11:12 AM

I’m planning on using doc/view architecture presently.  Basically the main window of the MDI app would be a tabbed interface.  Somewhat like VS.  But each of the views would themselves hold a tabbed view which breaks down the object into managable parts.  For example, I could open several trucks and have several tabs across the top showing the route number.  When I select route1 the view has several colored tabs across the bottom one of which is a form view that displays tractor-trailor information, one displays the manifest in a grid, one displays a map of the route and other displays the driver information.  So I could select a route tab from the top and have several views I could switch between within that view.  The route and it’s subtabs would be tied to the document.

 

This is the direction I’m looking at now.  Any suggestions would be welcome!

 

Thanks for the quick response!

Technical Support Dec 14, 2005 - 8:38 AM

You can start using the MDIDOCVIEW sample as a startup. First of all, create an MDI tab control in the CMainFrame class:

// declaration
    CExtTabMdiWnd m_wndMdiTabs;
// creation
    if( ! m_wndMdiTabs.Create( this ) )
    {
        ASSERT( FALSE );
        return -1;
    }
The creation of the MDI tab control should be the final operation performed by the CMainFrame::OnCreate() method. You can also use the CExtTabMdiFlatWnd, CExtTabMdiWhidbeyWnd(), or CExtTabMdiOneNoteWnd() class as the type of the m_wndMdiTabs property instead.

The next step is to create a tab page container window as a child of the CMDIDOCVIEWView window. You need to add the CExtTabPageContainerWnd() (or CExtTabPageContainerWhidbeyWnd() or CExtTabPageContainerFlatWnd() or CExtTabPageContainerOneNoteWnd()) property and the WM_CREATE and WM_SIZE message handler to the CMDIDOCVIEWView class. The CMDIDOCVIEWView::OnDraw() method should be left empty. Then, create the tab page container window and its children page windows in the OnCreate() method. Finally, to fit all the view’s client area, move the container window in the OnSize() method.

Do not hesitate to contact us if you encounter any difficulties at any step.