Bug Attaching windows to docking pane |
Post Reply |
Author | |
adrien
Senior Member Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
Post Options
Thanks(0)
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?
|
|
adrien
Senior Member Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
Post Options
Thanks(0)
|
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.
|
|
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 |