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ü
|