Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - DoPropExchange DockingPane Taskpanel
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

DoPropExchange DockingPane Taskpanel

 Post Reply Post Reply
Author
Message
andolo View Drop Down
Groupie
Groupie
Avatar

Joined: 16 November 2005
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote andolo Quote  Post ReplyReply Direct Link To This Post Topic: DoPropExchange DockingPane Taskpanel
    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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
andolo View Drop Down
Groupie
Groupie
Avatar

Joined: 16 November 2005
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote andolo Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.