Problem restoring pane positions |
Post Reply |
Author | |
ContactGT
Newbie Joined: 30 October 2006 Status: Offline Points: 28 |
Post Options
Thanks(0)
Posted: 01 November 2006 at 6:56am |
I have worked through the "Add a Docking Pane to your application" tutorial and everything is working perfectly, except for the restore of Pane positions... In my MainFrame class I have lines of code like this (for each pane) of these in my header file: CXTPDockingPane *pwndProjList; And in my OnCreate() method (above the code to restore the layout) I have a number of lines of code like this (for each pane): pwndProjList = m_paneManager.CreatePane(IDR_PANE_PROJLIST, CRect(0, 0,200, 250), xtpPaneDockBottom);
// Load the previous state for docking panes.
// Save the current state for docking panes. If I include the layoutNormal code above, then the panes move to exactly where I left them, but their contents all disappear (all panes just go grey). If I remove the layoutNormal code, then the panes have content, but appear in the default positions (obviously). Am I going about restoring the pane positions in the wrong way? How do I get my content to display back? |
|
rmercer
Groupie Joined: 22 February 2006 Status: Offline Points: 34 |
Post Options
Thanks(0)
|
Do you also have an OnDockingPaneNotify handler to process XTP_DPN_SHOWWINDOW ?
Based off your example it would be something along the lines of:
LRESULT CMainFrame::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam)
{ if (wParam == XTP_DPN_SHOWWINDOW)
{
CXTPDockingPane *p_pane = (CXTPDockingPane*)lParam;
if (!p_pane->IsValid())
{
switch (p_pane->GetID())
{
case IDR_PANE_PROJLIST:
p_pane->Attach((CWnd*)&m_wndProjectListWindow);
break;
}
}
return TRUE;
}
return FALSE;
}
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |