Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Docking pane crash with MFC ...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Docking pane crash with MFC ...

 Post Reply Post Reply
Author
Message
singulus View Drop Down
Newbie
Newbie


Joined: 16 September 2004
Location: Bulgaria
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote singulus Quote  Post ReplyReply Direct Link To This Post Topic: Docking pane crash with MFC ...
    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

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 17 November 2004 at 8:56am
Hide the pane after the second pane is specified as its neighbor.
Back to Top
singulus View Drop Down
Newbie
Newbie


Joined: 16 September 2004
Location: Bulgaria
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote singulus Quote  Post ReplyReply Direct Link To This Post 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.

 

 

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
Back to Top
singulus View Drop Down
Newbie
Newbie


Joined: 16 September 2004
Location: Bulgaria
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote singulus Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
Back to Top
singulus View Drop Down
Newbie
Newbie


Joined: 16 September 2004
Location: Bulgaria
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote singulus Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2004 at 2:58am

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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
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.156 seconds.