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 » CView derived class as tab window Collapse All
Subject Author Date
Adrian Michel Feb 26, 2005 - 12:57 AM

I’m just getting started with the library, so please be patient with those simple questions...

The view in my app needs to be a tabbed window. Which should I use: a property sheet or a tabbed window? And if a tabbed window is more appropriate (it looks like it offers more flexibility), how do I create a tabbed CView class? BTW, I’ll be using this in a MDI app.

Thanks,

adrian

Rachel Webster Nov 10, 2020 - 6:34 AM

GUI development is a let’s technology. This technology has been utilized very successfully by Hollywood. As they are making very animated movies like https://www.paraphrasinguk.com/professional-editing-services-uk/ in which they are using VFX so that is the good utilization of GUI.

Technical Support Feb 27, 2005 - 11:37 AM

Dear Adrian,

First of all, we need to know some more details about your task. You could use CExtTabMdiWnd window inside CMainFrame to add support for the MDI tab control that is automatically synchronized with all open MDI child frames.

If you need a tabbed interface inside a view window, then you should use CExtTabPageContainerWnd window as a singe child window inside your view and stretch it to fit the entire view’s client area. You should handle WM_CREATE message of your view class, create the tab page container and insert page windows into it.

In any case, you will have to make a choice between Visual Studio .NET 2002/2003/2005 tabs (CExtTabMdiWnd, CExtTabPageContainerWnd), flat Excel-like tabs (CExtTabMdiFlatWnd, CExtTabPageContainerFlatWnd), colored One Note tabs (CExtTabMdiOneNoteWnd, CExtTabPageContainerOneNoteWnd) and Whidbey (CExtTabMdiWhidbeyWnd, CExtTabPageContainerWhidbeyWnd) tabs.

Please tell us more details on what you plan to do and we will help you with advice or provide you with a sample application. Of course, you may send us your project with a list of requirements.

Please also take a look at examples of tabbed interfaces:

  • Whidbey MDI tab control (CExtTabMdiWhidbeyWnd) is used in the CMainFrame class of the ProfStudio sample application
  • One Note MDI tab control (CExtTabMdiOneNoteWnd) is used in the CMainFrame class of the DRAWCLI sample application
  • Visual Studio .NET-like MDI tab control (CExtTabMdiWnd) is used in the CMainFrame class of the FormEditor sample application
  • Several flat tab page containers (CExtTabPageContainerFlatWnd) are used as child windows of resizable control bars in the TabPages sample application
  • Flat tab page container is also used as a child view (i.e. the CExtTabPageContainerFlatWnd class is the base class of the CChildView class) in the SimpleGrids sample application - it seems that is what you need, but in the MDI environment

Adrian Michel Feb 27, 2005 - 4:59 PM

Thanks for your answer.

I think what I need is actually a tab control inside a child frame, each of the tabs corresponding to a different view of the document. Basically, this would be like a "mini MDI" inside a child frame, where different views of the same document will be displayed by selecting the corresponding tab.

One other question: is there a way to create a specialized tree control, with checkboxes at leaf level, which could be checked/unchecked, using any of your classes (I have an older Stingray Objective Toolkit that has this feature, but it won’t compile under Visual Studio .net 2003).

BTW, I’m impressed with the thoroughness of your replies - it’s not like the usual: "look in the help," or "read the doc". Thank you!

Adrian

Technical Support Feb 28, 2005 - 12:13 PM

Dear Adrian,

Thank you for the kind words. The technical support is one of our top priorities and you can see yourself that it’s not just words.

Let’s now get to the answers to your questions.

1. Just create your tab page container as a child window of the child frame (it can be CExtTabPageContainerWnd, CExtTabPageContainerFlatWnd, CExtTabPageContainerOneNoteWnd, or CExtTabPageContainerWhidbeyWnd). Then add your views to the tab page container with the CExtTabPageContainerWnd::PageInsert() method. Please note that the primary view is a view with ID equal to AFX_IDW_PANE_FIRST.

CExtTabPageContainerWnd m_wndTabPageContainer;
 
int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
            if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
                        return -1;
 
            m_wndTabPageContainer.Create( 
                        this, 
                        CRect(0,0,0,0),
                        AFX_IDW_PANE_FIRST
                        );
 
            // insert tab pages (views) here
 
return 0;
}

2. Unfortunately we have not included any ready-to-use enhanced tree control into Prof-UIS. We try to implement only the most valuable and not easily coded components. But if you believe that a free version of such a control cannot be found on the Internet and it is important, we can code it and add to the library.

Adrian Michel Feb 28, 2005 - 6:48 PM

I think I posted my reply somewhere else - so sorry if there are multiple similar posts.


1. I used MDI_InnerOuterBars as the template for my project and as things are going very well thanks to your help :)


This sample doesn’t use the document template to link everything together. What advice do you have for using or not using the document/view mechanisms (such as for updating views from a document) in this case.


2. I found a few tree control classes on the web (although they seem to be somewhat limited in functionality) but I just thought that you may be providing more advanced features already in the set of control classes. I personally think it’s better to have everything in one package rather than patching things with code from various places, so if you think it meets your development goals too, I would gladly use your version of a tree control.


Thanks again for your advice,


Adrian

Technical Support Mar 1, 2005 - 7:21 AM

The document view architecture is extremely handy if you need:

  • printing/print preview features

  • to support the "Window/New Window" command which opens a new view of an existing document and multiple views are automatically synchronized

  • OLE documents with embedded objects

  • automated document, i.e. your document class may be created as a COM object and application instance will live with at least one document object, but without any frames or views

  • to code an OLE document or Active Document server/container

  • RichText document

  • Some simple feature like keeping track of the document’s modified state flag with the automatic prompt to save
Of course, there are lots of MFC-based GUI controls that can be found on the Internet. You are probably right about adding more controls to the package, but we always tried to avoid including any classes which are similar to or based on well known other controls that are available on such websites like codeguru or codeproject.

Adrian Michel Mar 1, 2005 - 9:03 AM

Thanks again for your detailed reply.


Actually my question is more specific - I’d like to use the doc/view model in my app, but I am not sure if it’s easier to modify the MDI_InnerOuterBars sample to use the Doc/View model or start over with a fresh MDI app and add all the features I need that are currently implemented in the sample.


Regards,


Adrian

Technical Support Mar 1, 2005 - 10:07 AM

We think that it will be easier to you if you start with creating a new MDI application with support for the document/view architecture. From our experience, in this case people do less mistakes and use only those Prof-UIS controls and features in their projects that are mostly fit their needs. Of course, you can count on our help and support.