Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Floating Pane associated with wrong Frame
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Floating Pane associated with wrong Frame

 Post Reply Post Reply
Author
Message
acwest View Drop Down
Groupie
Groupie


Joined: 23 April 2010
Location: Canada
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote acwest Quote  Post ReplyReply Direct Link To This Post Topic: Floating Pane associated with wrong Frame
    Posted: 04 November 2010 at 3:35pm
I recently updated my current project to use the 13.4.2 version of the toolkit instead of version 12, and now we have a problem. We have two main windows in our application, both of which are docking sites. When a pane is undocked, it normally stays visible in front of the frame it is associated with (you can't hide it behind the docking site window). As of the library upgrade, however, all floating panes seem to have this association with the application main frame window, not their docking site. Has anybody else seen this?
Back to Top
acwest View Drop Down
Groupie
Groupie


Joined: 23 April 2010
Location: Canada
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote acwest Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2011 at 4:20pm
Has NOBODY seen anything like this happen?
Back to Top
acwest View Drop Down
Groupie
Groupie


Joined: 23 April 2010
Location: Canada
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote acwest Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2011 at 5:20pm
After some investigation, I have discovered the problem, and I think it is a bug. In CXTPDockingPaneMiniWnd::Create, there is a pair of lines:
CWnd* pParentWnd = GetDockingPaneManager()->GetSite();
if (pParentWnd->GetStyle() & WS_CHILD) pParentWnd = AfxGetMainWnd();

The problem is that the docking site is not the top level frame, and the top level frame is not the main window (There are multiple top level frames in the app)
This results in incorrect behaviour. I can probably work around it by re-writing the Create method in my subclass of CXTPDockingPaneMiniWnd, but I would prefer a more elegant solution...
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.250 seconds.