Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Bug Attaching windows to docking pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug Attaching windows to docking pane

 Post Reply Post Reply
Author
Message
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Topic: Bug Attaching windows to docking pane
    Posted: 29 February 2008 at 9:17pm
I'm trying to use a single docking pane to display any number of windows.
 
So when someone selects something new, I'm calling Detach() then Attach() to attach the new CWnd to the tabbed pane.
 
This causes some weird problems.
 
For starters it doen't draw the new tab.  This is because the selection hasn't changed, and in CXTPDockingPaneTabbedContainer::InvalidatePane
 
bSelectionChanged = false, so it doesn't draw the pane.
 
If I select another pane then back to the one, it shows it fine, although as soon as I resize the tabbed panel, it stops showing it again (just shows grey background).
 
I've tried calling all sorts of things... including windows functions on the hWND of the child window.  I can see in Spy++ that the window does changeits parent.
 
Is it supposed to be supported to attach and detach windows at will from a docked pane?
Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Posted: 29 February 2008 at 9:21pm
p.s. - sorry, the call stack shows that the call to InvalidatePane was in the context of me resetting the pane title, nothing to do with attaching the pane.
 
All that seems to do is set the new parentage. It's weird that it won't then redraw.
 
Also, when I'm attaching the window, I only have an HWND, so I'm passing in CWnd::FromHandle(hchild) to Attach().  I see the pane only stores the hwnd, and when it wants a CWnd it calls FromHandle itself, so I presume there's no problem with what I'm doing there.
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.172 seconds.