I didn't find exactly what I was looking for, but I was able to create a workaround, which works well for us.
My approach was to create a layout, then save it to the registry if it doesn't already exist. I was informed that layouts must be created in whole, then activated. You cannot move panes around one at a time any way you like - which is what I really wanted.
Anyway, in the following code sample, I have a window pane layout named "Visual Studio". If it was already created and saved to the registry, it is loaded and the layout is "set" (available). If it doesn't already exist, I create the layout, and save it to the registry.
// Create or load the Visual Studio Layout
m_pLayoutVisualStudio = m_paneManager.CreateLayout();
if (m_pLayoutVisualStudio->Load(_T("VisualStudio")))
{
m_paneManager.SetLayout(m_pLayoutVisualStudio);
}
else
{
m_paneManager.DockPane(m_pwndTreeView, dockLeftOf);
m_paneManager.DockPane(m_pwndOutbar, dockLeftOf, m_pwndTreeView);
m_paneManager.DockPane(m_pwndPaneChartRealtime, dockBottomOf);
m_paneManager.DockPane(m_pwndPaneOutput, dockBottomOf);
m_paneManager.DockPane(m_pwndPaneLog, dockBottomOf);
m_paneManager.DockPane(m_pwndPaneChartResponseTime, dockBottomOf);
m_paneManager.AttachPane(m_pwndOutbar, m_pwndTreeView);
m_paneManager.AttachPane(m_pwndPaneOutput, m_pwndPaneChartRealtime);
m_paneManager.AttachPane(m_pwndPaneLog, m_pwndPaneChartRealtime);
m_paneManager.AttachPane(m_pwndPaneChartResponseTime, m_pwndPaneChartRealtime);
m_pwndTreeView->Select();
m_pwndPaneChartRealtime->Select();
m_paneManager.GetLayout(m_pLayoutVisualStudio);
m_pLayoutVisualStudio->Save(_T("VisualStudio"));
}
Whenever I want to show the Visual Studio layout, I just set the pane manager layout:
m_paneManager.SetLayout(m_pLayoutVisualStudio);
Conceivably, you could do this on the fly...
Tim Hodgson ExclamationSoft ( http://www.ExclamationSoft.com - http://www.ExclamationSoft.com ) ------------------------------------------------------------ --- WebWatchBot - Your site is down, and so is your revenue NetMailBot - Automate Email Processes MailListBot - Send Email and more in VB and ASP Smtp.NET - Send Email and more in .NET
|