When a view is floating as an MDI child, the view is contained in an SECMDIChildWnd; in the same way that views in typical MDI applications are contained by CMDIChildWnd frames.
However, when the view is docked, this containment relationship changes significantly. The view is actually re-parented to a new frame window called an SECDockableFrame. The SECDockableFrame acts as a godparent. It fulfills the MFC requirement that stipulates that only frames may contain CView classes. The SECDockableFrame is in turn parented by an SECFrameBar that is SECControlBar derived. In turn SECControlBar resides in one of the dock bars belonging to the main frame. During a docking operation, only the CView survives.
When a view is floated outside the main frame, the containment relationship is similar to that of a docked view state.
When a docked view becomes floated, a new SECFrameBar instance is created. In other words, this instance is not the same instance as when the frame was docked to the main frame. However, the SECDockableFrame instance does survive the transition from the docked state and remains the parent of the view. When the view is floated again as an MDI child, the SECFrameBar is undocked from the SECDockBar, both the SECDockableFrame and the SECFrameBar are destroyed, and the CView is re-parented to a newly instantiated SECMDIChildWnd. Again, note that during this transition from docked or floating to an MDI child state only the CView survives.
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.