Print Page | Close Window

Bug Attaching windows to docking pane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=9748
Printed Date: 19 May 2024 at 11:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bug Attaching windows to docking pane
Posted By: adrien
Subject: Bug Attaching windows to docking pane
Date 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?



Replies:
Posted By: adrien
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net