A class which encapsulates an MFC CControlBar
. Derived from a PyCWnd object.
-
The framework calls this member function to calculate the dimensions of a dynamic toolbar.
-
Calculates the horizontal size of a control bar
-
Specifies whether the control bar supports docking and the sides of its parent window.
-
-
Retrieves the control bar style settings.
-
Returns the number of non-HWND elements in the control bar.
-
Returns the frame window to which a control bar is docked.
-
Returns a nonzero value if the control bar in question is a floating control bar.
-
Modifies the control bar style settings.
-
Shows the window, and recalculates the toolbar layout.
-
PyCFrameWnd dockSite
Current dock site, if dockable
-
PyCWnd dockBar
Current dock bar, if dockable
-
PyCDockContext dockContext
Used during dragging
-
int dwStyle
creation style (used for layout)
-
int dwDockStyle
indicates how bar can be docked
PyCControlBar.CalcDynamicLayout
int = CalcDynamicLayout(length, dwMode
) The framework calls this member function to calculate the dimensions of a dynamic toolbar.
-
length : int
The requested dimension of the control bar, either horizontal or vertical, depending on dwMode.
-
dwMode : int
A combination of flags.
PyCControlBar.CalcDynamicLayout Virtual
CalcDynamicLayout() Override to augment control-bar size calculations.
The base implementation is not called if a handler exists. This can be
done via CPythonControlBar::CalcDynamicLayout
.
- CPythonControlBar::CalcDynamicLayout
PyCControlBar.CalcFixedLayout
int = CalcFixedLayout(bStretch, bHorz
) Calculates the horizontal size of a control bar
-
bStretch : int
Indicates whether the bar should be stretched to the size of the frame. The bStretch parameter is nonzero when the bar is not a docking bar (not available for docking) and is 0 when it is docked or floating (available for docking).
-
bHorz : int
Indicates that the bar is horizontally or vertically oriented.
PyCControlBar.CalcFixedLayout Virtual
CalcFixedLayout() Override to augment control-bar size calculations.
The base implementation is not called if a handler exists. This can be
done via CPythonControlBar::CalcFixedLayout
.
- CPythonControlBar::CalcFixedLayout
PyCControlBar.EnableDocking
EnableDocking(style) pecifies whether the control bar supports docking and the sides of its parent window.
-
style : int
Enables a control bar to be docked.
PyCControlBar.EraseNonClient
EraseNonClient()
PyCControlBar.GetBarStyle
int = GetBarStyle() Retrieves the control bar style settings.
PyCControlBar.GetCount
int = GetCount() Returns the number of non-HWND elements in the control bar.
PyCControlBar.GetDockingFrame
PyCFrameWnd = GetDockingFrame() Returns the frame window to which a control bar is docked.
PyCControlBar.IsFloating
int = IsFloating() Returns a nonzero value if the control bar in question is a floating control bar.
PyCControlBar.OnBarStyleChange Virtual
OnBarStyleChange() Override to augment control-bar size calculations.
The base implementation is not called if a handler exists. This can be
done via CPythonControlBar::OnBarStyleChange
.
PyCControlBar.OnUpdateCmdUI Virtual
OnUpdateCmdUI(frame, bDisableIsNoHandler
)
-
frame : PyCFrameWnd
-
bDisableIsNoHandler : int
PyCControlBar.SetBarStyle
SetBarStyle(style) Modifies the control bar style settings.
-
style : int
The new style
PyCControlBar.ShowWindow
int = ShowWindow() Shows the toolbar, and recalculates the button layout.
This method is provided for convenience. For further details, see
PyCWnd::ShowWindow and PyCFrameWnd::RecalcLayout
The return value is that returned from PyCWnd::ShowWindow