CReBar Class

A control bar that provides layout, persistence, and state information for rebar controls.

class CReBar : public CControlBar

Members

Public Methods

Name

Description

CReBar::AddBar

Adds a band to a rebar.

CReBar::Create

Creates the rebar control and attaches it to the CReBar object.

CReBar::GetReBarCtrl

Allows direct access to the underlying common control.

Remarks

A rebar object can contain a variety of child windows, usually other controls, including edit boxes, toolbars, and list boxes. A rebar object can display its child windows over a specified bitmap. Your application can automatically resize the rebar, or the user can manually resize the rebar by clicking or dragging its gripper bar.

Example of RebarMenu

Rebar Control

A rebar object behaves similarly to a toolbar object. A rebar uses the click-and-drag mechanism to resize its bands. A rebar control can contain one or more bands, with each band having any combination of a gripper bar, a bitmap, a text label, and a child window. However, bands cannot contain more than one child window.

CReBar uses the CReBarCtrl class to provide its implementation. You can access the rebar control through GetReBarCtrl to take advantage of the control's customization options. For more information about rebar controls, see CReBarCtrl. For more information about using rebar controls, see Using CReBarCtrl.

Warning

Rebar and rebar control objects do not support MFC control bar docking. If CRebar::EnableDocking is called, your application will assert.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CControlBar

CReBar

Requirements

Header: afxext.h

See Also

Reference

CControlBar Class

Hierarchy Chart

Concepts

MFC Sample MFCIE