|
|
|
|
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.
Subject |
Author |
Date |
|
Alfonso Bastias
|
Feb 26, 2006 - 12:22 PM
|
Hello, I’d like to add a tab container to the CChildFrame where each tab is a view to a specifit CView derived class (doc/view). I can’t figure out yet the appropiate way to do that.
I sent an email to Suppor with extra info (and screenshots). Your help is appreciate.
PROF-UIS 2.52 (commercial version) VS 2005
Thanks Alfonso
|
|
Alfonso Bastias
|
Feb 27, 2006 - 12:02 AM
|
Just I solved this problem, I looked ’closer’ the example MDI_DynamicInnerOuterBars, and I am OK... My next step is implement the Dynamic Bar, look nice, but not easier to implement.
Cheers, Alfonso
|
|
Technical Support
|
Feb 27, 2006 - 8:34 AM
|
We think there is no point to use dynamic control bars in your case. There is a much easier way to implement your tabbed interface. Just create your tab page container as a child window of the child frame. You need to make a choice between Visual Studio .NET 2002/2003/2005 tabs (CExtTabPageContainerWnd ), flat Excel-like tabs (CExtTabPageContainerFlatWnd ), colored One Note tabs (CExtTabPageContainerOneNoteWnd ) and Whidbey (CExtTabPageContainerWhidbeyWnd ) tabs. Then add your views to the tab page <code>container with the <code>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;
} Please also take a look at these examples of tabbed interfaces:
- ProfStudio sample: Whidbey MDI tab control (
CExtTabMdiWhidbeyWnd ) in the CMainFrame class
- DRAWCLI sample: One Note MDI tab control (
CExtTabMdiOneNoteWnd ) in the CMainFrame class
- FormEditor sample: Visual Studio .NET-like MDI tab control (
CExtTabMdiWnd ) in the CMainFrame class
- TabPages sample: Several flat tab page containers (
CExtTabPageContainerFlatWnd ) are used as child windows of resizable control bars
- SimpleGrids sample: Flat tab page container is also used as a child view (i.e. the
CExtTabPageContainerFlatWnd class is a base class of CChildView )
The latter seems to be what you really need but the MDI environment.
|
|
Alfonso Bastias
|
Feb 26, 2006 - 12:27 PM
|
|
|