CDockingManager Class

Implements the core functionality that controls docking layout in a main frame window.

class CDockingManager : public CObject

Members

Public Methods

Name

Description

CDockingManager::AddDockSite

Creates a dock pane and adds it to the list of control bars.

CDockingManager::AddHiddenMDITabbedBar

Adds a handle to a bar pane to the list of hidden MDI tabbed bar panes.

CDockingManager::AddMiniFrame

Adds a frame to the list of mini frames.

CDockingManager::AddPane

Registers a pane with the docking manager.

CDockingManager::AdjustDockingLayout

Recalculates and adjusts the layout of all panes in a frame window.

CDockingManager::AdjustPaneFrames

Causes the WM_NCCALCSIZE message to be sent to all panes and CPaneFrameWnd windows.

CDockingManager::AdjustRectToClientArea

Adjusts the alignment of a rectangle.

CDockingManager::AlignAutoHidePane

Resizes a docking pane in autohide mode so that it takes the full width or height of the frame’s client area surrounded by dock sites.

CDockingManager::AutoHidePane

Creates an autohide toolbar.

CDockingManager::BringBarsToTop

Brings the docked bars that have the specified alignment to the top.

CDockingManager::BuildPanesMenu

Adds names of docking panes and toolbars to a menu.

CDockingManager::CalcExpectedDockedRect

Calculates the expected rectangle of a docked window.

CDockingManager::Create

Creates a docking manager.

CDockingManager::DeterminePaneAndStatus

Determines the pane that contains a given point and its docking status.

CDockingManager::DisableRestoreDockState

Enables or disables loading of docking layout from the registry.

CDockingManager::DockPane

Docks a pane to another pane or to a frame window.

CDockingManager::DockPaneLeftOf

Docks a pane to the left of another pane.

CDockingManager::EnableAutoHidePanes

Enables docking of the pane to the main frame, creates a dock pane, and adds it to the list of control bars.

CDockingManager::EnableDocking

Creates a dock pane and enables docking of the pane to the main frame.

CDockingManager::EnableDockSiteMenu

Displays an additional button that opens a pop-up menu on the captions of all docking panes.

CDockingManager::EnablePaneContextMenu

Tells the library to display a special context menu that has a list of application toolbars and docking panes when the user clicks the right mouse button and the library is processing the WM_CONTEXTMENU message.

CDockingManager::FindDockSite

Retrieves the bar pane that is at the specified position and that has the specified alignment.

CDockingManager::FindDockSiteByPane

Returns the bar pane that has the id of the target bar pane.

CDockingManager::FindPaneByID

Finds a pane by the specified control ID.

CDockingManager::FixupVirtualRects

Commits all current toolbar positions to virtual rectangles.

CDockingManager::FrameFromPoint

Returns the frame that contains the given point.

CDockingManager::GetClientAreaBounds

Gets the rectangle that contains the bounds of the client area.

CDockingManager::GetDockingMode

Returns the current docking mode.

CDockingManager::GetDockSiteFrameWnd

Gets a pointer to the parent window frame.

CDockingManager::GetEnabledAutoHideAlignment

Returns the enabled alignment of the panes.

CDockingManager::GetMiniFrames

Gets a list of miniframes.

CDockingManager::GetOuterEdgeBounds

Gets a rectangle that contains the outer edges of the frame.

CDockingManager::GetPaneList

Returns a list of panes that belong to the docking manager. This includes all floating panes.

CDockingManager::GetSmartDockingManager

Retrieves a pointer to the smart docking manager.

CDockingManager::GetSmartDockingManagerPermanent

Retrieves a pointer to the smart docking manager.

CDockingManager::GetSmartDockingParams

Returns the smart docking parameters for the docking manager.

CDockingManager::GetSmartDockingTheme

A static method that returns a theme used to display smart docking markers.

CDockingManager::HideAutoHidePanes

Hides a pane that is in autohide mode.

CDockingManager::InsertDockSite

Creates a dock pane and inserts it into the list of control bars.

CDockingManager::InsertPane

Inserts a control pane into the list of control bars.

CDockingManager::IsDockSiteMenu

Specifies whether a pop-up menu is displayed on the captions of all panes.

CDockingManager::IsInAdjustLayout

Determines if the layouts of all panes are adjusted.

CDockingManager::IsOLEContainerMode

Specifies whether the docking manager is in OLE container mode.

CDockingManager::IsPointNearDockSite

Determines whether a specified point is near the dock site.

CDockingManager::IsPrintPreviewValid

Determines if the print preview mode is set.

CDockingManager::LoadState

Loads the docking manager's state from the registry.

CDockingManager::LockUpdate

Locks the given window.

CDockingManager::OnActivateFrame

Called by the framework when the frame window is made active or is deactivated.

CDockingManager::OnClosePopupMenu

Called by the framework when an active pop-up menu processes a WM_DESTROY message.

CDockingManager::OnMoveMiniFrame

Called by the framework to move a mini-frame window.

CDockingManager::OnPaneContextMenu

Called by the framework when it builds a menu that has a list of panes.

CDockingManager::PaneFromPoint

Returns the pane that contains the given point.

CDockingManager::ProcessPaneContextMenuCommand

Called by the framework to select or to clear a check box for the specified command and recalculate the layout of a shown pane.

CDockingManager::RecalcLayout

Recalculates the internal layout of the controls present in the list of controls.

CDockingManager::ReleaseEmptyPaneContainers

Releases the empty pane containers.

CDockingManager::RemoveHiddenMDITabbedBar

Removes the specified hidden bar pane.

CDockingManager::RemoveMiniFrame

Removes a specified frame from the list of mini frames.

CDockingManager::RemovePaneFromDockManager

Unregisters a pane and removes it from the list in the docking manager.

CDockingManager::ReplacePane

Replaces one pane with another.

CDockingManager::ResortMiniFramesForZOrder

Resorts the frames in the list of mini frames.

CDockingManager::SaveState

Saves the docking manager's state to the registry.

CDockingManager::SendMessageToMiniFrames

Sends the specified message to all mini frames.

CDockingManager::Serialize

Writes the docking manager to an archive. (Overrides CObject::Serialize.)

CDockingManager::SetAutohideZOrder

Sets the size, width, and height of the control bars and the specified pane.

CDockingManager::SetDockingMode

Sets the docking mode.

CDockingManager::SetDockState

Sets the docking state of the control bars, the mini frames, and the autohide bars.

CDockingManager::SetPrintPreviewMode

Sets the print preview mode of the bars that are displayed in the print preview.

CDockingManager::SetSmartDockingParams

Sets the parameters that define the behavior of smart docking.

CDockingManager::ShowDelayShowMiniFrames

Shows or hides the windows of the mini frames.

CDockingManager::ShowPanes

Shows or hides the panes of the control and autohide bars.

CDockingManager::StartSDocking

Starts the smart docking of the specified window according to the alignment of the smart docking manager.

CDockingManager::StopSDocking

Stops smart docking.

Data Members

Name

Description

CDockingManager::m_bHideDockingBarsInContainerMode

Specifies whether the docking manager hides panes in OLE container mode.

CDockingManager::m_dockModeGlobal

Specifies the global docking mode.

CDockingManager::m_nDockSensitivity

Specifies the docking sensitivity.

CDockingManager::m_nTimeOutBeforeDockingBarDock

Specifies the time, in milliseconds, before a docking pane is docked in immediate docking mode.

CDockingManager::m_nTimeOutBeforeToolBarDock

Specifies the time, in milliseconds, before a toolbar is docked to the main frame window.

Remarks

The main frame window creates and initializes this class automatically.

The docking manager object holds a list of all panes that are in the docking layout, and also a list of all CPaneFrameWnd windows that belong to the main frame window.

The CDockingManager class implements some services that you can use to find a pane or a CPaneFrameWnd window. You usually do not call these services directly because they are wrapped in the main frame window object. For more information, see CPaneFrameWnd Class.

Customization Tips

The following tips apply to CDockingManager objects:

Example

The following example demonstrates how to use various methods in the CDockingManager class to configure a CDockingManager object. The example shows how to display an additional button that opens a pop-up menu on the captions of all docking panes and how to set the docking mode of the object. This code snippet is part of the Visual Studio Demo sample.

   CDockingManager* pDockManager = GetDockingManager();
    ASSERT_VALID(pDockManager);
    pDockManager->AdjustPaneFrames();
    pDockManager->EnableDockSiteMenu();
    pDockManager->SetDockingMode(DT_STANDARD);

Inheritance Hierarchy

CObject

   CDockingManager

Requirements

Header: afxDockingManager.h

See Also

Reference

Hierarchy Chart

CObject Class

CFrameWndEx Class

CDockablePane Class

CPaneFrameWnd Class

Other Resources

MFC Classes