Print Page | Close Window

Docking pane crash with MFC ...

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=1423
Printed Date: 02 June 2024 at 1:53pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Docking pane crash with MFC ...
Posted By: singulus
Subject: Docking pane crash with MFC ...
Date Posted: 17 November 2004 at 8:27am

Hi,

  The problem occures when I try to create a docking pane and specify another (hidden one) as its neigbour!

Here is the code:

  CXTPDockingPane* pPaneClassView = m_paneManager.CreatePane(IDR_PANE_CLASSVIEW,  &nbs p; CRect(0, 0,200, 120), dockLeftOf, NULL);
 if (pPaneClassView) {
    m_paneManager.HidePane(pPaneClassView);
 }

 CXTPDockingPane* pPaneInfoView = m_paneManager.CreatePane(IDR_PANE_INFOVIEW, CRect(0, 0,200, 120), dockLeftOf, pPaneClassView); // this crashes the application !!!!
  if (pPaneInfoView ) {
   m_paneManager.AttachPane(pPaneInfoView , pPaneClassView );   
  }  

Can this be fixed somehow?

Thanks




Replies:
Posted By: SuperMario
Date Posted: 17 November 2004 at 8:56am
Hide the pane after the second pane is specified as its neighbor.


Posted By: singulus
Date Posted: 18 November 2004 at 2:10am

Yes, I know that

The problem is that I need to use the docking pane the way I've described !

Due to some application requirements I need to attach docking panes at runtime to a hidden one.

A new docking pane can be attached at any time during the application lifetime.

 

 



Posted By: Oleg
Date Posted: 19 November 2004 at 12:24am

You can attach it in any time, but you can't dock it left of _hidden pane_

so create it as

CXTPDockingPane* pPaneInfoView = m_paneManager.CreatePane(IDR_PANE_INFOVIEW, CRect(0, 0,200, 120), dockLeftOf, NULL);



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


Posted By: singulus
Date Posted: 22 November 2004 at 6:38am

Oleg,

 I tried to create it the way you said, but the result is still not the one expected! If I set the neighbour to NULL and then call 'AttachPane' the two panes are not being attached ! Instead they seem to be just docked at one and the same side of the frame window.

This behaviour confuses me. Since I have the pane created, why should I care whether it is visible or not? As a developper I don't need to know whether a particular window is visible in order to use it's methods (like SetWindowText for example)!

  Now is this a bug or the whole toolkit is based on this strange idea?

  My employer requires this feature but I can't think of a solution !!!

 So can this be fixed and when?



Posted By: Oleg
Date Posted: 22 November 2004 at 11:06am

I think it is error in your code.

Im visual studio in some command event I added 

m_paneManager.AttachPane(m_paneManager.FindPane(ID_VIEW_SOLU TIONEXPLORER),
  m_paneManager.FindPane(ID_VIEW_CLASSVIEW));

and it works.

 

check may be you need to switch first and second parameter.

 

You can create simple application, copy code from your programm and upload it here. I will find the error.

 



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


Posted By: singulus
Date Posted: 23 November 2004 at 2:58am

https://forum.codejock.com/uploads/singulus/2004-11-23_025244_paneactions.rar - 2004-11-23_025244_paneactions.rar

Oleg,

 here is a test project. Try executing the commands in the "My Actions" menu. The problem occurs when creating the third docking pane ! The example specifies a NULL neighbour to all the docking panes created. If I try to set the first docking pane as the neighbour of all the others the application asserts. 

Thanks for your help



Posted By: Oleg
Date Posted: 23 November 2004 at 11:56pm

What version do you have? I don't see any bugs/asserts

in the samlpe attched try to switch

from

m_paneManager.AttachPane(pPane, pChildPane);      

to

m_paneManager.AttachPane(pChildPane, pPane);      



-------------
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