Problem with autohide docking pane |
Post Reply |
Author | ||
dedvalson
Groupie Joined: 10 April 2008 Status: Offline Points: 21 |
Post Options
Thanks(0)
Posted: 22 May 2008 at 4:47pm |
|
In my app, I use the following code in CMainFrame::OnCreate to create two docking bars with dialogs in them:
This causes the "Tree" pane to come up docked to the left below the "MiniMon" pane which is docked to the top and occupies the full width of the application. This is what it want it to do and it works well except for one problem. If the user clicks the push-pin on the "Tree" pane to auto-hide it (which most do), then it can no longer be undocked or have auto-hide turned off. Double clicking on the border does nothing, nor does clicking on the push-pin to cancel the auto-hide. I assume I am just doing something stupid, can anyone advise? |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
I guess you have NotifyHandler and reurn 1 always. or maybe disable some actions.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
dedvalson
Groupie Joined: 10 April 2008 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
|
Oleg,
Thanks for the reply. I don't think I am doing either of those things. But I did find some more information. Perhaps I need to look somewhere else in my code.
I found that if I comment out the line
TreePane->Attach (&Tree);
So that the docking pane is not attached to a child dialog, it all works fine.
I then tried replacing the Tree child with a simple, unmodified CDialog, and the problem came back. So I know the problem can't be in the Tree code anywhere since it is no longer in use. I think this means it must be a CMainFrame problem, but that seems strange since it works when the Pane has no child.
I am still trying to track this down, I would appreciate any ideas.
Thanks
Don
|
||
dedvalson
Groupie Joined: 10 April 2008 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
|
For what it is worth, I thought I might attach a stack trace that shows where the code goes when I click on the PushPin to try to un-autohide the window.
When I click on the PushPin, the Docked Window immediately disappears and then slides back out again from the side.
Don
CXTPDockingPaneManager::_RemovePane(CXTPDockingPaneBase * pPane=0x081c47c8) Line 469 + 0x19 bytes C++ CXTPDockingPaneManager::_AttachPane(CXTPDockingPaneBase * pPane=0x081c47c8, CXTPDockingPaneBase * pNeighbour=0x0bb8c4a4) Line 496 C++ CXTPDockingPaneManager::AttachPane(CXTPDockingPaneBase * pPane=0x081c47c8, CXTPDockingPaneBase * pNeighbour=0x0bb8c4a4) Line 475 C++ CXTPDockingPaneManager::_ToggleDocking(CXTPDockingPane * pPane=0x081c47a8, CXTPDockingPaneBase * pHolder=0x0bb8c4a4) Line 760 C++ CXTPDockingPaneManager::ToggleDocking(CXTPDockingPaneBase * pPane=0x0bb8c4a4) Line 709 + 0x5d bytes C++ CXTPDockingPaneTabbedContainer::OnCaptionButtonClick(CXTPDockingPaneCaptionButton * pButton=0x0bb8c820) Line 725 C++ CXTPDockingPaneTabbedContainer::OnLButtonDown(unsigned int __formal=1, CPoint point={...}) Line 798 + 0x16 bytes C++ CWnd::OnWndMsg(unsigned int message=513, unsigned int wParam=1, long lParam=852144, long * pResult=0x0012f8b4) Line 2169 C++ CXTPDockingPaneTabbedContainer::OnWndMsg(unsigned int message=513, unsigned int wParam=1, long lParam=852144, long * pResult=0x0012f8b4) Line 1356 C++ CWnd::WindowProc(unsigned int message=513, unsigned int wParam=1, long lParam=852144) Line 1741 + 0x20 bytes C++ AfxCallWndProc(CWnd * pWnd=0x0bb8c450, HWND__ * hWnd=0x003d0f76, unsigned int nMsg=513, unsigned int wParam=1, long lParam=852144) Line 240 + 0x1c bytes C++ AfxWndProc(HWND__ * hWnd=0x003d0f76, unsigned int nMsg=513, unsigned int wParam=1, long lParam=852144) Line 389 C++ |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
Actaully you have call Attach only in Handler. See how our sample work.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
dedvalson
Groupie Joined: 10 April 2008 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
|
Hi,
I moved the creation of the Dialogs and the Attach calls to the OnDockingPaneNotify function as the samples do.
This resulted in no changes, the pushpin still doesn't work.
Don
|
||
dedvalson
Groupie Joined: 10 April 2008 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
|
Hi,
I found another piece of information.
Calling the PaneManger.ToggleAutoHide for this pane doesn't work either. It works the first time to hide it, but won't work subsequent times to unhide it.
Don
|
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hello,
I need some sample to see what you do :-(
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
dedvalson
Groupie Joined: 10 April 2008 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
|
Oleg,
This problem is much more complex that I thought.
The docking panes work fine until I open a document in my application. Then the push pin problem that I described starts happening.
I guess that something in my Document / View is causing this, but I don't know what it is yet.
I am using the CXTPDockingPaneLayout code to save the position of the panes in the registry.
One repeatable symptom happens if I open the app and then open a document (which breaks the pushpin) and then exit the app which causes the docking state to be written to the registry.
After doing that, the pushpin will always be broken, even if I close the app and reopen it and don't open a document. So whatever is being written to the registry "persists" the broken pushpin.
Would it be useful for me to send a pair of .reg files, one good and one bad?
Other than that, I think maybe you shouldn't worry about this until I figure out better what my document might be doing.
Thanks,
Don
|
||
dedvalson
Groupie Joined: 10 April 2008 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
|
Hi, Here is some information that I hope might be useful. I added some code to save the Docking Pane layout as a file using CXTPDockingPaneLayout::SaveToFile. The following file was generated when the dock pane was working properly:
The file below was generated after opening and the closing a document.
As you can see, the lower one has one less pane than the upper one. Both of them result in the same visual appearance when loaded, but when I load the upper one, the pushpin still works. When I load the lower one it doesn't. Thanks, Don |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
Sorry, I have to debug your project. I sure its some code inside. Try to create smaller version of project and send to support@codejock.com.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |