Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - create pane in same spot it was destroyed
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

create pane in same spot it was destroyed

 Post Reply Post Reply
Author
Message
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Topic: create pane in same spot it was destroyed
    Posted: 16 May 2004 at 6:49pm

How can you tell if a pane is docked with a neighbor or not? For a single pane, I can get the dock direction, window rect, float/hidden/docked status and put the pane back in the same spot it was destroyed if I save all this information, but with two panes, it does not work since you can dock panes with neighbors. For example, if I have a two panes side by side at the bottom of the window, destroy and recreate one of them, it will appear either above/below the existing pane or completely on the left/right side of the window, not left/right side by side of the existing pane at the bottom, unless I manually specify the proper neighbor pane when creating the new pane.  But I do not see a function to retrieve what the neighbor pane is or how to do this?

Back to Top
brianh View Drop Down
Groupie
Groupie


Joined: 30 April 2004
Location: United Kingdom
Status: Offline
Points: 83
Post Options Post Options   Thanks (0) Thanks(0)   Quote brianh Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2004 at 3:40am

Hi,

I'm sorry I don't have an answer to your question but I was hoping you could help me.   I'm trying to find the first pane that's docked to the bottom of the frame, I can enumerate the panes and find the ones that are docked but I can't see how to get the dock direction.  In your question you mention that you can find this, can you tell me how?

Thanks.



Edited by brianh
Back to Top
Ark42 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 20 October 2003
Status: Offline
Points: 291
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ark42 Quote  Post ReplyReply Direct Link To This Post Posted: 17 May 2004 at 11:58am

XTPWM_DOCKINGPANE_NOTIFY ... XTP_DPN_ACTION ... XTP_DOCKINGPANE_ACTION *pAction = (XTP_DOCKINGPANE_ACTION *)lParam; CXTPDockingPane *pPane = pAction->pPane; ... switch( pPane->GetID() ) ... case IDR_YOURPANE: ...  switch( pAction->action ) ... case xtpPaneActionDocking: ... m_yourpaneDockSide = pAction->dockDirection;


Back to Top
brianh View Drop Down
Groupie
Groupie


Joined: 30 April 2004
Location: United Kingdom
Status: Offline
Points: 83
Post Options Post Options   Thanks (0) Thanks(0)   Quote brianh Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2004 at 3:38am

I had already found the 'action' callback and the dockDirection member but my problem is that when I want to add a new pane I have to go through the pane list and identify, for each pane, where it is currently docked, so I don't have an XTP_DOCKINGPANE_ACTION  object.

I suspect that the dockDirection member is only valid when actually docking a pane (I know for some other actions it just defaults to 'left'), so I guess I could add a map to associate each pane to a dockDirection and maintain it in the 'action' callbacks but it just seems like a lot of work.  I would have thought there would be a way to get the dock direction from the pane object itself but I can't see it if there is.

Thanks for your help, and sorry to have gone off topic.

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.203 seconds.