Print Page | Close Window

DoPropExchange DockingPane Taskpanel

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3331
Printed Date: 11 January 2026 at 6:25pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DoPropExchange DockingPane Taskpanel
Posted By: andolo
Subject: DoPropExchange DockingPane Taskpanel
Date Posted: 02 December 2005 at 5:58am
Hi,

i use the CXTPTaskPanel as childwindow in CXTPDockingPane.
Now, when i use PaneManager.SetLayout after a successful Layout->LoadFromFile
the following problem occurs:

Confused my first trial:
creating a taskpanel in CXTPDockingPaneManager::OnCreatePane
and calling the dockingpanes attach method, the setparent message in the attach method failed (i know the dockingpanes copy-method sets the child handle pointer to 0; there i destroy and create new the taskpanel). Seems that the dockingpane is not ready.


Cry second trial:
i create my panel on OnDockingPaneNotify/XTP_DPN_SHOWWINDOW. then the DoPropExchange-method is not called to restore my taskpanelgroupitems.


Please help with ideas.

Thanks in advance

Andreas



Replies:
Posted By: Oleg
Date Posted: 02 December 2005 at 10:34am

Hi,

You can create TaskPanel in CMainFrame::OnCreate before DockingPanes and only attach it in OnDockingPaneNotify handler.

See GUI_Whidbey sample.. where TaskPanel located in DockingPane.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: andolo
Date Posted: 06 December 2005 at 3:44am
i read the nuber of panes from xml so I don't know how many panes/panels i have to create. So i overwrote the Clone-method:

CXTPDockingPaneBase* MyXTPDockingPane::Clone(CXTPDockingPaneLayout* pLayout, CXTPPaneToPaneMap* pMap, DWORD /*dwIgnoredOptions*/)
{
    ASSERT(pMap);

    MyXTPDockingPane* pPane = (MyXTPDockingPane*)GetDockingPaneManager()->OnCreatePane( GetType(), pLayout);

    MyXTPTaskPanel* pPanel = dynamic_cast<MyXTPTaskPanel*>(pPane->GetChild());

    if(pPanel)
    {
        pPanel->DestroyWindow();
        pPanel = NULL;
    }

    pPane->Copy(this);
    pPane->Attach(GetChild());

    m_hwndChild = 0;

    pMap->SetAt(this, pPane);


    return pPane;
}

This works as far as i can see and hope this won't result in other problems.


with regards

Andreas


Posted By: Oleg
Date Posted: 06 December 2005 at 8:46am

 

you can do

1. Load panes (Layout.DoPropExchange)

2. Check number of Panes

layoutNormal.GetPaneList().GetCount()

3. Create this number TaskPanels and call DoPropEchange for each.

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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