Share via


CBasePane Class

Base class for all panes in MFC.

class CBasePane : public CWnd

Members

Public Constructors

Name

Description

CBasePane::CBasePane

Default constructor.

CBasePane::~CBasePane

Destructor.

Public Methods

Name

Description

CBasePane::accHitTest

Called by the framework to retrieve the child element or child object at a given point on the screen. (Overrides CWnd::accHitTest.)

CBasePane::accLocation

Called by the framework to retrieve the current screen location for the specified object. (Overrides CWnd::accLocation.)

CBasePane::AccNotifyObjectFocusEvent

CBasePane does not use this method.

CBasePane::accSelect

Called by the framework to modify the selection or move the keyboard focus of the specified object. (Overrides CWnd::accSelect.)

CBasePane::AddPane

Adds a pane to the docking manager.

CBasePane::AdjustDockingLayout

Redirects a call to the docking manager to adjust the docking layout.

CBasePane::AdjustLayout

Called by the framework when the pane should adjust its internal layout.

CBasePane::CalcFixedLayout

Calculates the horizontal size of a control bar.

CBasePane::CanAcceptPane

Determines whether another pane can be docked to the pane.

CBasePane::CanAutoHide

Determines whether the pane supports auto-hide mode.

CBasePane::CanBeAttached

Determines whether the pane can be docked to another pane.

CBasePane::CanBeClosed

Determines whether the pane can be closed.

CBasePane::CanBeDocked

Determines whether the pane can be docked to another pane.

CBasePane::CanBeResized

Determines whether the pane can be resized.

CBasePane::CanBeTabbedDocument

Specifies whether the pane can be converted to an MDI tabbed document.

CBasePane::CanFloat

Determines whether the pane can float.

CBasePane::CanFocus

Specifies whether the pane can receive focus.

CBasePane::CopyState

Copies the state of a given pane.

CBasePane::CreateDefaultMiniframe

If the pane can float, creates a mini-frame window.

CBasePane::CreateEx

Creates the pane control.

CBasePane::DockPane

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

CBasePane::DockPaneUsingRTTI

Docks the pane by using run-time type information.

CBasePane::DockToFrameWindow

Docks a dockable pane to a frame.

CBasePane::DoesAllowDynInsertBefore

Determines whether another pane can be dynamically inserted between this pane and the parent frame.

CBasePane::EnableDocking

Enables docking of the pane to the main frame.

CBasePane::EnableGripper

Enables or disables the gripper. If the gripper is enabled, the user can drag it to reposition the pane.

CBasePane::FillWindowRect

Used internally.

CBasePane::FloatPane

Floats the pane.

CBasePane::get_accChild

Called by the framework to retrieve the address of an IDispatch interface for the specified child. (Overrides CWnd::get_accChild.)

CBasePane::get_accChildCount

Called by the framework to retrieve the number of children that belong to this object. (Overrides CWnd::get_accChildCount.)

CBasePane::get_accDefaultAction

Called by the framework to retrieve a string that describes the default action for the object. (Overrides CWnd::get_accDefaultAction.)

CBasePane::get_accDescription

Called by framework to retrieve a string that describes the visual appearance of the specified object. (Overrides CWnd::get_accDescription.)

CBasePane::get_accFocus

Called by the framework to retrieve the object that has the keyboard focus. (Overrides CWnd::get_accFocus.)

CBasePane::get_accHelp

Called by the framework to retrieve a Help property string for the object. (Overrides CWnd::get_accHelp.)

CBasePane::get_accHelpTopic

Called by the framework to retrieve the full path of the WinHelpfile that is associated with the specified object and the identifier of the appropriate topic in that file. (Overrides CWnd::get_accHelpTopic.)

CBasePane::get_accKeyboardShortcut

Called by the framework to retrieve the specified shortcut key for the object. (Overrides CWnd::get_accKeyboardShortcut.)

CBasePane::get_accName

Called by the framework to retrieve the name of the specified object. (Overrides CWnd::get_accName.)

CBasePane::get_accParent

Called by the framework to retrieve the IDispatch interface for the parent of the object. (Overrides CWnd::get_accParent.)

CBasePane::get_accRole

Called by the framework to retrieve information that describes the role of the specified object. (Overrides CWnd::get_accRole.)

CBasePane::get_accSelection

Called by the framework to retrieve the selected children of this object. (Overrides CWnd::get_accSelection.)

CBasePane::get_accState

Called by the framework to retrieve the current state of the specified object. (Overrides CWnd::get_accState.)

CBasePane::get_accValue

Called by the framework to retrieve the value of the specified object. (Overrides CWnd::get_accValue.)

CBasePane::GetCaptionHeight

Returns the caption height.

CBasePane::GetControlBarStyle

Returns the control bar style.

CBasePane::GetCurrentAlignment

Returns the current pane alignment.

CBasePane::GetDockingMode

Returns the current docking mode for the pane.

CBasePane::GetDockSiteFrameWnd

Returns a pointer to the window that is the dock site for the pane.

CBasePane::GetEnabledAlignment

Returns the CBRS_ALIGN_ styles that are applied to the pane.

CBasePane::GetMFCStyle

Returns the pane styles specific to MFC.

CBasePane::GetPaneIcon

Returns a handle to the pane icon.

CBasePane::GetPaneRect

Used internally.

CBasePane::GetPaneRow

Returns a pointer to the CDockingPanesRowobject where the pane is docked.

CBasePane::GetPaneStyle

Returns the pane style.

CBasePane::GetParentDockSite

Returns a pointer to the parent dock site.

CBasePane::GetParentMiniFrame

Returns a pointer to the parent mini-frame window.

CBasePane::GetParentTabbedPane

Returns a pointer to the parent tabbed pane.

CBasePane::GetParentTabWnd

Returns a pointer to the parent window that is inside a tab.

CBasePane::GetRecentVisibleState

The framework calls this method when a pane is restored from an archive.

CBasePane::HideInPrintPreviewMode

Specifies whether the pane is hidden in print preview.

CBasePane::InsertPane

Registers the specified pane with the docking manager.

CBasePane::IsAccessibilityCompatible

Specifies whether the pane supports Active Accessibility.

CBasePane::IsAutoHideMode

Determines whether a pane is in auto-hide mode.

CBasePane::IsDialogControl

Specifies whether the pane is a dialog control.

CBasePane::IsDocked

Determines whether the pane is docked.

CBasePane::IsFloating

Determines whether the pane is floating.

CBasePane::IsHorizontal

Determines whether the pane is docked horizontally.

CBasePane::IsInFloatingMultiPaneFrameWnd

Specifies whether the pane is in a multi-pane frame window.

CBasePane::IsMDITabbed

Determines whether the pane has been added to an MDI child window as a tabbed document.

CBasePane::IsPaneVisible

Specifies whether the WS_VISIBLE flag is set for the pane.

CBasePane::IsPointNearDockSite

Determines whether a specified point is near the dock site.

CBasePane::IsResizable

Determines whether the pane can be resized.

CBasePane::IsRestoredFromRegistry

Determines whether the pane is restored from the registry.

CBasePane::IsTabbed

Determines whether the pane has been inserted in the tab control of a tabbed window.

CBasePane::IsTooltipTopmost

Used internally.

CBasePane::IsVisible

Determines whether the pane is visible.

CBasePane::LoadState

Loads the pane state from the registry.

CBasePane::MoveWindow

Moves the pane.

CBasePane::OnAfterChangeParent

Called by the framework when the pane's parent has been changed.

CBasePane::OnBeforeChangeParent

Called by the framework just before the pane changes its parent window.

CBasePane::OnDrawCaption

The framework calls this method when the caption is drawn.

CBasePane::OnMovePaneDivider

This method is currently not used.

CBasePane::OnPaneContextMenu

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

CBasePane::OnRemoveFromMiniFrame

Called by the framework when a pane is removed from its parent mini frame window.

CBasePane::OnSetAccData

CBasePane does not use this method.

CBasePane::OnUpdateCmdUI

Used internally.

CBasePane::PaneFromPoint

Returns the pane that contains the given point.

CBasePane::PreTranslateMessage

Used by class CWinApp to translate window messages before they are dispatched to the TranslateMessage and DispatchMessage Windows functions. (Overrides CWnd::PreTranslateMessage.)

CBasePane::RecalcLayout

CBasePane does not use this method.

CBasePane::RemovePaneFromDockManager

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

CBasePane::SaveState

Saves the pane's state to the registry.

CBasePane::SelectDefaultFont

Selects the default font for a given device context.

CBasePane::Serialize

Reads or writes this object from or to an archive. (Overrides CObject::Serialize.)

CBasePane::SetControlBarStyle

Sets the control bar style.

CBasePane::SetDockingMode

Sets the docking mode for the pane.

CBasePane::SetMDITabbed

Used internally.

CBasePane::SetPaneAlignment

Sets the alignment for the pane.

CBasePane::SetPaneRect

Used internally.

CBasePane::SetPaneStyle

Sets the style of the pane.

CBasePane::SetRestoredFromRegistry

Used internally.

CBasePane::SetWindowPos

Changes the size, position, and Z-order of a pane.

CBasePane::ShowPane

Shows or hides the pane.

CBasePane::StretchPane

Stretches a pane vertically or horizontally.

CBasePane::UndockPane

Removes the pane from the dock site, default slider, or mini-frame window where it is currently docked.

Protected Methods

Name

Description

CBasePane::DoPaint

Fills the background of the pane.

Remarks

If you want to create a pane class that supports the extended docking features available in MFC, you must derive it from CBasePane or from CPane Class.

Customization Tips

The following customization tips pertain to the CBasePane Class and any classes that inherit from it:

  • When you create a pane, you can apply several new styles:

    • AFX_CBRS_FLOAT makes the pane float.

    • AFX_CBRS_AUTOHIDE enables auto-hide mode.

    • AFX_CBRS_CLOSE enables the pane to be closed (hidden).

    These are flags that you can combine with a bitwise-OR operation.

    CBasePane implements the following virtual Boolean methods to reflect these flags: CBasePane::CanBeClosed, CBasePane::CanAutoHide, CBasePane::CanFloat. You can override them in derived classes to customize their behavior.

  • You can customize docking behavior by overriding CBasePane::CanAcceptPane. Have your pane return FALSE from this method to prevent another pane from docking to it.

  • If you want to create a static pane that cannot float and that prevents any other pane from docking before it (similar to the Outlook bar in the OutlookDemo example), create it as non-floating and override CBasePane::DoesAllowDynInsertBefore to return FALSE. The default implementation returns FALSE if the pane is created without the AFX_CBRS_FLOAT style.

  • Create all panes with IDs other than -1.

  • To determine pane visibility, use CBasePane::IsVisible. It correctly handles the visibility state in tabbed and auto-hide modes.

  • If you want to create a non-floating resizable pane, create it without the AFX_CBRS_FLOAT style and call CFrameWnd::DockControlBar.

  • To exclude a pane from a docking layout or to remove a toolbar from its dock bar, call CBasePane::UndockPane. Do not call this method for panes in auto-hide mode or for panes that reside in tabs of tabbed windows.

  • If you want to float or undock a pane that is in auto-hide mode, you must call CDockablePane::SetAutoHideMode with FALSE as the first argument before you call CBasePane::FloatPane or CBasePane::UndockPane.

Example

The following example demonstrates how to use various methods in the CBasePane class. The example demonstrates how to retrieve a pane from the CFrameWndEx class and how to set the docking mode, the pane alignment, and the pane style. The code is from the Word Pad sample.

// This CMainFrame class extends the CFrameWndEx class. 
            // GetPane is a method in the CFrameWndEx class which  
            // Returns a pointer to the pane that has the specified ID.
            CBasePane* pBar = GetPane(ID_VIEW_FORMATBAR);
            if (pBar != NULL)
            {
                // Set the docking mode, the pane alignment, and the pane style.
                pBar->SetDockingMode(DT_STANDARD);
                pBar->SetPaneAlignment(CBRS_ALIGN_LEFT);
                pBar->SetPaneStyle(pBar->GetCurrentAlignment() | CBRS_TOOLTIPS);
                pBar->ShowPane(TRUE, FALSE, FALSE);
            }

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CBasePane

Requirements

Header: afxbasepane.h

See Also

Reference

Hierarchy Chart

CBasePane Class

CWnd Class

Other Resources

MFC Classes