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 General Discussion » How to implement SDI application with multiple views in tabbed interface ? Collapse All
Subject Author Date
Vitali Bounine May 29, 2006 - 2:45 PM

Can you explain main steps to correctly create SDI-based application with multipleviews in modern tabbed interface?
Your examples only give the MDI tabbed app. The Visual Studio Wizard creates tabbed interface only for MDI applications too. Or Did I miss something?

Technical Support May 30, 2006 - 12:09 PM

If you do not need the document/view architecture, you can create a simple SDI project and modify it. The CChildView class in this project is derived from CWnd. You should modify this class and derive it from any of available tab page containers: CExtTabPageContainerWnd, CExtTabPageContainerFlatWnd, CExtTabPageContainerWhidbeyWnd, CExtTabPageContainerOneNoteWnd.or CExtTabPageContainerButtonsWnd. After that create all the needed classes which implement child windows for the tab page container window. You can use these classes for defining members in the CChildView class, create them in the CChildView::OnCreate() method and insert them as pages with the CExtTabPageContainerWnd::PageInsert() method. The SimpleGrids and ActiveScripts samples have exactly the same UI design. The SDI_DynamicBars sample application also uses a tab page container as the main view window but it does not define classes for page windows. All the windows in this sample are implemented as children of dynamic resizable control bars. These bars are controlled by the dynamic bar site and can be switched into the document mode

If you need the document/view architecture, then we recommend you use the MDI project type. It is possible to make the MDI project having the look of the SDI project. For instance, the ProfStudio sample is an MDI application which optionally uses MDI interface or tabbed interface. You can switch between these two modes in the View menu. If it runs in the tabbed mode, then all the MDI child frames are maximized and the user cannot restore or maximize them, the MDI tabs window is hidden and the menu bar does not show the MDI document buttons.

Of course, it is possible to code SDI application based on the document/view architecture with multiple views but this is a very custom design which even closer to the default MDI design.

Jean-Yves Garneau Jan 15, 2007 - 8:05 AM

Hi,
I’m very interrested by this because I have not found a good example for a SDI with multiple views.

The ProfStudio sample seem to be a bad example because it don’t use the Document/View architecture. How can have a single document with multiple views? With MDI we have multiple documents and want I want is single document.

Can you direct us to make a SDI TabbedView from standard MFC AppWizard SDI? Can I put a CExtTabPageContainerWhidbeyWnd in the application View and insert page from there? What is the best approach ?

Thank You!

Technical Support Jan 15, 2007 - 1:25 PM

If you need to use view windows linked to document objects (i.e. the MFC document/view architecture should be 100% applied in your project), then we recommend you to stick to MDI project type. It is possible to create MDI application which will host constantly maximized MDI child frames, do not display MDI document buttons and MDI Window in menu bar and use Whidbey style MDI tabs. This application will look exactly like the same SDI application with the Whidbey style tab page container.

The PageContainer sample application is SDI and not based on the MFC’s document/view architecture, but it uses view window without attaching it to document object. You can use the same approach to create several view windows inside the tab page container.