The Docking Views Classes
Because the docking views architecture builds on the extended docking windows architecture, each of the docking windows classes also participates in the docking views architecture.
Figure 152 – Objective Toolkit’s Docking Views Class Hierarchy
There are also changes and additions to existing classes such as SECMDIFrameWnd and SECMDIChildWnd. These changes ensure that SECDockableFrame objects are included in the command routing class chain so that menu picks are properly routed to a docked document if it is active.
The SECDockableFrame class derives from SECFrameWnd and is the focal point of the docking views architecture. This class is a hybrid of a control bar and a frame window. It possesses the attributes and functionality of both. Because it is a frame-derived object, an instance of SECDockableFrame can parent a CView, CSplitterWnd, SECTabWnd or any CWnd-derivative. An SECDockableFrame also has an optional title bar for showing activation and contains the logic required to change the menu bar when activated, like a frame window. Like an SECControlBar, a dockable frame can be docked and resized when it is docked.
An SECDockableFrame object acts as the immediate parent window of the view when its docked or floating outside the main frame, which fulfills the MFC requirement that views always reside as a child of a frame object.
The SECFrameBar class derives from SECControlBar. This class acts as a container for the SECDockableFrame when the view is either docked or floating outside the main frame. It adds the accessor method GetDockedFrame(). This class acts as the bridge between the docking views architecture and the docking windows architecture.
The SECMDIChildWnd class derives from CMDIChildWnd and acts as the parent window for the view when floating as an MDI child.
The SECMultiDocTemplate class plays an essential role. Derived from CMultiDocTemplate, it not only creates the document, view, and frame window but it also connects them together. As you might expect, the SECMultiDocTemplate inherits most of its functionality from its base class. However, it adds knowledge of the SECDockableFrame class and knows how to open a new document as either a normal MDI child or a docking document. In addition, the SECMultiDocTemplate class also adds a ToggleDocking() method, which allows open documents to be toggled between docked and undocked states.
SECMultiDocTemplate has an overloaded constructor that allows you to specify the run-time classes of the necessary participants in case you need to derive from the base architecture classes.
SECMultiDocTemplate(UINT nIDResource,
CRuntimeClass* pDocClass,
CRuntimeClass* pFrameClass,
CRuntimeClass* pViewClass,
UINT nIDDockableResource = 0,
pDockableFrameClass = 0,
pControlBarClass = 0);
The parameters of this constructor are described in the table below. The first four parameters are the same as that of the parent class, CMultiDocTemplate.
Table 55 – Parameters for SECMultiDocTemplate’s constructor 
The ID of the resources used with the document type.
Points to the CRuntimeClass object of the document class.
Points to the CRuntimeClass object of the frame window class.
Points to the CRuntimeClass object of the view class.
The ID of the resources used to load the accelerator table and menus for the SECDockableFrame.
Points to the CRuntimeClass object of the dockable frame class (defaults to SECDockableFrame).
Points to the CRuntimeClass object of the control bar class (defaults to SECFrameBar).