Compartilhar via


CControlBar Class

The base class for the control-bar classes CStatusBar, CToolBar, CDialogBar, CReBar, and COleResizeBar.

class CControlBar : public CWnd

Members

Protected Constructors

Name

Description

CControlBar::CControlBar

Constructs a CControlBar object.

Public Methods

Name

Description

CControlBar::CalcDynamicLayout

Returns the size of a dynamic control bar as a CSize object.

CControlBar::CalcFixedLayout

Returns the size of the control bar as a CSize object.

CControlBar::CalcInsideRect

Returns the current dimensions of the control bar area; including the borders.

CControlBar::DoPaint

Renders the borders and gripper of the control bar.

CControlBar::DrawBorders

Renders the borders of the control bar.

CControlBar::DrawGripper

Renders the gripper of the control bar.

CControlBar::EnableDocking

Allows a control bar to be docked or floating.

CControlBar::GetBarStyle

Retrieves the control bar style settings.

CControlBar::GetBorders

Retrieves the border values of the control bar.

CControlBar::GetCount

Returns the number of non-HWND elements in the control bar.

CControlBar::GetDockingFrame

Returns a pointer to the frame to which a control bar is docked.

CControlBar::IsFloating

Returns a nonzero value if the control bar in question is a floating control bar.

CControlBar::OnUpdateCmdUI

Calls the Command UI handlers.

CControlBar::SetBarStyle

Modifies the control bar style settings.

CControlBar::SetBorders

Sets the border values of the control bar.

CControlBar::SetInPlaceOwner

Changes the in-place owner of a control bar.

Public Data Members

Name

Description

CControlBar::m_bAutoDelete

If nonzero, the CControlBar object is deleted when the Windows control bar is destroyed.

CControlBar::m_pInPlaceOwner

The in-place owner of the control bar.

Remarks

A control bar is a window that is usually aligned to the left or right of a frame window. It may contain child items that are either HWND-based controls, which are windows that generate and respond to Windows messages, or non-HWND-based items, which are not windows and are managed by application code or framework code. List boxes and edit controls are examples of HWND-based controls; status-bar panes and bitmap buttons are examples of non-HWND-based controls.

Control-bar windows are usually child windows of a parent frame window and are usually siblings to the client view or MDI client of the frame window. A CControlBar object uses information about the parent window's client rectangle to position itself. It then informs the parent window as to how much space remains unallocated in the parent window's client area.

For more information on CControlBar, see:

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CControlBar

Requirements

Header: afxext.h

See Also

Reference

CWnd Class

Hierarchy Chart

CToolBar Class

CDialogBar Class

CStatusBar Class

CReBar Class

Concepts

MFC Sample CTRLBARS