When creating an MDI Application with "Visual Studio" style using the AppWizard of VS2008 (plus Feature Pack), the CMainFrame
class gets a method CreateDockingWindows()
.
Since I don't want all panes to be always visible but display them depending on the type of the active document, I made those windows to members of my views and also moved the creation to OnInitialUpdate()
. I create those panes in the same manner as was done by the CMainFrame
including setting the main frame as parent window.
The positions of the docking windows get saved to the registry automatically but they won't be restored because the docking windows don't yet exist when the frame is initialized.
Is it a good idea to create the docking windows with the views or should I expect more problems? Is there a better way to accomplish what I want?
Thanks in advance!