Print Page | Close Window

How to create a Docking MultiTab Pane

Printed From: Codejock Forums
Category: General
Forum Name: Articles and Tutorials
Forum Description: Articles and Tutorials
URL: http://forum.codejock.com/forum_posts.asp?TID=16939
Printed Date: 27 April 2024 at 12:39am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to create a Docking MultiTab Pane
Posted By: elmue
Subject: How to create a Docking MultiTab Pane
Date Posted: 12 July 2010 at 9:11am
Hello

I invested a lot of time to get it working.

Now here it is:
A docking pane that contains multiple documents.
I modified the sample GUI_VisualStudio that now hosts all Script Editor Childs in a Docking Pane.

Neither MFC nor Xtreme Toolkit provide this functionality.
There is the CXTPTabControl in the Xtreme Toolkit.
But the functionality is rather limited in comparison to the CXTPTabClientWnd which normally hosts the Tabs in a MultiDocument application.
But MFC has not been designed to run CMDIChildWnd in a pane.
So a part of the functionalty had to be overridden or partially re-impemented.

CMultiDocTemplate in MFC can not be used to create the CDocument/CView's.

In this download you find my class CPaneMultiTab which does all the work.
But also in CMainFrame and in the CGUI_VisualStudioApp some changes where necessary.

When Microsoft has developed MFC they never thought that anybody might add panes to their MultiDoc classes and run a TabControl with CMDIChildWnd's in this pane. Microsoft routes all commands like opening a file and the Edit commands to CWinApp which does the default processing.
There where some changes necessary.
But finally it works like a charme.

I find this functionality so etremely usefull that I don't understand why there is no Codejock sample available that shows how to do that.
What about adding my class to the toolkit ?
Or at least adding my sample to the samples collection ?

There is no sample available that shows how to host multiple CDocument/CView pairs in a pane in a Tab Control.
There are some samples with Tab controls but they are not usefull for this purpose.

I hope my several hours of work are helpfull for some other people.

Download the Project GUI_VisualStudio_MultiTab:
uploads/20100712_090552_GUI_VisualStudi.zip - uploads/20100712_090552_GUI_VisualStudi.zip

ATTENTION:
This project will not compile if you don't copy it to
.....\Xtreme Toolkit\Samples\UserInterface\GUI_VisualStudio_MultiTab\

Elmü











Replies:
Posted By: znakeeye
Date Posted: 16 July 2010 at 5:50pm
Thanks for sharing!

-------------
PokerMemento - http://www.pokermemento.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net