共用方式為


CPane Class

The CPane class is an enhancement of the CControlBar Class. If you are upgrading an existing MFC project, replace all occurrences of CControlBar with CPane.

class CPane : public CBasePane

Members

Public Constructors

Name

Description

CPane::~CPane

Destructor.

Public Methods

Name

Description

CPane::AdjustSizeImmediate

Immediately recalculates the layout of a pane.

CPane::AllocElements

Allocates storage for internal use.

CPane::AllowShowOnPaneMenu

Specifies whether the pane is listed in the runtime-generated list of panes for the application.

CPane::CalcAvailableSize

Calculates the difference in size between a specified rectangle and the current window rectangle.

CPane::CalcInsideRect

Calculates the inside rectangle of a pane, taking into account the borders and grippers.

CPane::CalcRecentDockedRect

Calculates the recently docked rectangle.

CPane::CalcSize

Calculates the size of the pane.

CPane::CanBeDocked

Determines whether the pane can be docked at the specified base pane.

CPane::CanBeTabbedDocument

Determines whether the pane can be converted to a tabbed document.

CPane::ConvertToTabbedDocument

Converts a dockable pane to a tabbed document.

CPane::CopyState

Copies the state of a pane. (Overrides CBasePane::CopyState.)

CPane::Create

Creates a control bar and attaches it to the CPane object.

CPane::CreateDefaultMiniframe

Creates a mini-frame window for a floating pane.

CPane::CreateEx

Creates a control bar and attaches it to the CPane object.

CPane::CreateObject

Used by the framework to create a dynamic instance of this class type.

CPane::DockByMouse

Docks a pane by using the mouse docking method.

CPane::DockPane

Docks the floating pane to a base pane.

CPane::DockPaneStandard

Docks a pane by using outline (standard) docking.

CPane::DockToFrameWindow

Docks a dockable pane to a frame. (Overrides CBasePane::DockToFrameWindow.)

CPane::DoesAllowSiblingBars

Indicates whether you can dock another pane at the same row where the current pane is docked.

CPane::FloatPane

Floats the pane.

CPane::GetAvailableExpandSize

Returns the amount, in pixels, that the pane can expand.

CPane::GetAvailableStretchSize

Returns the amount, in pixels, that the pane can shrink.

CPane::GetBorders

Returns the width of the borders of the pane.

CPane::GetClientHotSpot

Returns the hot spot for the pane.

CPane::GetDockSiteRow

Returns the dock row in which the pane is docked.

CPane::GetExclusiveRowMode

Determines whether the pane is in exclusive row mode.

CPane::GetHotSpot

Returns the hot spot that is stored in an underlying CMFCDragFrameImpl object.

CPane::GetMinSize

Retrieves the minimum allowed size for the pane.

CPane::GetPaneName

Retrieves the title for the pane.

CPane::GetResizeStep

Used internally.

CPane::GetThisClass

Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type.

CPane::GetVirtualRect

Retrieves the virtual rectangle of the pane.

CPane::IsChangeState

As the pane is being moved, this method analyzes the position of the pane relative to other panes, dock rows, and mini-frame windows, and returns the appropriate AFX_CS_STATUS value.

CPane::IsDragMode

Specifies whether the pane is being dragged.

CPane::IsInFloatingMultiPaneFrameWnd

Specifies whether the pane is in a multi-pane frame window. (Overrides CBasePane::IsInFloatingMultiPaneFrameWnd.)

CPane::IsLeftOf

Determines whether the pane is left of (or above) the specified rectangle.

CPane::IsResizable

Determines whether the pane can be resized. (Overrides CBasePane::IsResizable.)

CPane::IsTabbed

Determines whether the pane has been inserted in the tab control of a tabbed window. (Overrides CBasePane::IsTabbed.)

CPane::LoadState

Loads the state of the pane from the registry. (Overrides CBasePane::LoadState.)

CPane::MoveByAlignment

Moves the pane and the virtual rectangle by the specified amount.

CPane::MovePane

Moves the pane to the specified rectangle.

CPane::OnAfterChangeParent

Called by the framework when the parent of a pane has changed.

CPane::OnBeforeChangeParent

Called by the framework when the parent of the pane is about to change.

CPane::OnPressCloseButton

Called by the framework when the user chooses the Close button on the caption for the pane.

CPane::OnProcessDblClk

Used internally.

CPane::OnShowControlBarMenu

Called by the framework when a special pane menu is about to be displayed.

CPane::OnShowControlBarMenu

Called by the framework when a special pane menu is about to be displayed.

CPane::PrepareToDock

Used internally.

CPane::RecalcLayout

Recalculates layout information for the pane. (Overrides CBasePane::RecalcLayout.)

CPane::SaveState

Saves the state of the pane to the registry. (Overrides CBasePane::SaveState.)

CPane::SetActiveInGroup

Flags a pane as active.

CPane::SetBorders

Sets the border values of the pane.

CPane::SetClientHotSpot

Sets the hot spot for the pane.

CPane::SetDockState

Restores docking state information for the pane.

CPane::SetExclusiveRowMode

Enables or disables the exclusive row mode.

CPane::SetMiniFrameRTC

Sets the runtime class information for the default mini-frame window.

CPane::SetMinSize

Sets the minimum allowed size for the pane.

CPane::SetVirtualRect

Sets the virtual rectangle of the pane.

CPane::StretchPaneDeferWndPos

Stretches the pane vertically or horizontally based on docking style.

CPane::ToggleAutoHide

Toggles auto-hide mode.

CPane::UndockPane

Removes the pane from the dock site, default slider, or mini-frame window where it is currently docked. (Overrides CBasePane::UndockPane.)

CPane::UpdateVirtualRect

Updates the virtual rectangle.

Protected Methods

Name

Description

CPane::OnAfterDock

Called by the framework when a pane has been docked.

CPane::OnAfterFloat

Called by the framework when a pane has been floated.

CPane::OnBeforeDock

Called by the framework when the pane is about to be docked.

CPane::OnBeforeFloat

Called by the framework when a pane is about to be floated.

Data Members

Name

Description

CPane::m_bHandleMinSize

Enables consistent handling of the minimal size for panes.

CPane::m_recentDockInfo

Contains recent docking information.

Remarks

Typically, CPane objects are not instantiated directly. If you require a pane that has docking functionality, derive your object from CDockablePane. If you require toolbar functionality, derive your object from CMFCToolBar.

When you derive a class from CPane, it can be docked in a CDockSite and it can be floated in a CPaneFrameWnd.

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CBasePane

            CPane

Requirements

Header: afxPane.h

See Also

Reference

Hierarchy Chart

CBasePane Class

Other Resources

MFC Classes