CBasePane Class
This topic is included for completeness. For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.
Base class for all panes in the MFC Feature Pack.
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::accSelect |
Called by the framework to modify the selection or move the keyboard focus of the specified object. (Overrides CWnd::accSelect.) |
Adds a pane to the docking manager. |
|
Redirects a call to the docking manager to adjust the docking layout. |
|
Called by the framework when the pane should adjust its internal layout. |
|
|
|
Determines whether another pane can be docked to the pane. |
|
Determines whether the pane supports auto-hide mode. |
|
Determines whether the pane can be docked to another pane. |
|
Determines whether the pane can be closed. |
|
Determines whether the pane can be docked to another pane. |
|
Determines whether the pane can be resized. |
|
|
|
Determines whether the pane can float. |
|
Specifies whether the pane can receive focus. |
|
Copies the state of a given pane. |
|
If the pane can float, creates a mini-frame window. |
|
Creates the pane control. |
|
Docks a pane to another pane or to a frame window. |
|
Docks the pane by using run-time type information. |
|
|
|
Determines whether another pane can be dynamically inserted between this pane and the parent frame. |
|
Enables docking of the pane to the main frame. |
|
Enables or disables the gripper. If the gripper is enabled, the user can drag it to reposition the pane. |
|
|
|
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.) |
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.) |
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.) |
Returns the caption height. |
|
Returns the control bar style. |
|
Returns the current pane alignment. |
|
Returns the current docking mode for the pane. |
|
Returns a pointer to the window that is the dock site for the pane. |
|
Returns the CBRS_ALIGN_ styles that are applied to the pane. . |
|
Returns the pane styles specific to MFC Feature Pack. |
|
Returns a handle to the pane icon. |
|
|
|
Returns a pointer to the CDockingPanesRowobject where the pane is docked. |
|
Returns the pane style. |
|
Returns a pointer to the parent dock site. |
|
Returns a pointer to the parent mini-frame window. |
|
Returns a pointer to the parent tabbed pane. |
|
Returns a pointer to the parent window that is inside a tab. |
|
|
|
|
|
Registers the specified pane with the docking manager. |
|
|
|
|
|
|
|
Determines whether the pane is docked. |
|
Determines whether the pane is floating. |
|
Determines whether the pane is docked horizontally. |
|
|
|
Determines whether the pane has been added to an MDI child window as a tabbed document. |
|
|
|
Determines whether a specified point is near the dock site. |
|
Determines whether the pane can be resized. |
|
Determines whether the pane is restored from the registry. |
|
Determines whether the pane has been inserted in the tab control of a tabbed window. |
|
|
|
Determines whether the pane is visible. |
|
Loads the pane state from the registry. |
|
Moves the pane. |
|
Called by the framework when the pane's parent has been changed. |
|
Called by the framework just before the pane changes its parent window. |
|
|
|
|
|
Called by the framework when it builds a menu that has a list of panes. |
|
Called by the framework when a pane is removed from its parent mini frame window. |
|
|
|
|
|
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.) |
|
|
Unregisters a pane and removes it from the list in the docking manager. |
|
Saves the pane's state to the registry. |
|
Selects the default font for a given device context. |
|
CBasePane::Serialize |
Reads or writes this object from or to an archive. (Overrides CObject::Serialize.) |
Sets the control bar style. |
|
Sets the docking mode for the pane. |
|
|
|
Sets the alignment for the pane. |
|
|
|
Sets the style of the pane. |
|
|
|
Changes the size, position, and Z-order of a pane. |
|
Shows or hides the pane. |
|
Stretches a pane vertically or horizontally. |
|
Removes the pane from the dock site, default slider, or mini-frame window where it is currently docked. |
Protected Methods
Name |
Description |
---|---|
Fills the background of the pane. |
Remarks
If you want to create a pane class that supports the extended docking features available in MFC Feature Pack, you must derive it from CBasePane or from CPane Class.
Customization Tips
The Visual C++ 2008 Feature Pack introduces dockable control bars, known as panes. 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 WordPad Sample: MFC WordPad Application.
// 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
Requirements
Header: afxbasepane.h