CReBarCtrl Class

Encapsulates the functionality of a rebar control, which is a container for a child window.

class CReBarCtrl : public CWnd

Members

Public Constructors

Name

Description

CReBarCtrl::CReBarCtrl

Constructs a CReBarCtrl object.

Public Methods

Name

Description

CReBarCtrl::BeginDrag

Places the rebar control into drag-and-drop mode.

CReBarCtrl::Create

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

CReBarCtrl::CreateEx

Creates a rebar control with the specified Windows extended styles and attaches it to a CReBarCtrl object.

CReBarCtrl::DeleteBand

Deletes a band from a rebar control.

CReBarCtrl::DragMove

Updates the drag position in the rebar control after a call to BeginDrag.

CReBarCtrl::EndDrag

Terminates the rebar control's drag-and-drop operation.

CReBarCtrl::GetBandBorders

Retrieves the borders of a band.

CReBarCtrl::GetBandCount

Retrieves the count of bands currently in the rebar control.

CReBarCtrl::GetBandInfo

Retrieves information about a specified band in a rebar control.

CReBarCtrl::GetBandMargins

Retrieves the margins of a band.

CReBarCtrl::GetBarHeight

Retrieves the height of the rebar control.

CReBarCtrl::GetBarInfo

Retrieves information about the rebar control and the image list it uses.

CReBarCtrl::GetBkColor

Retrieves a rebar control's default background color.

CReBarCtrl::GetColorScheme

Retrieves the COLORSCHEME structure associated with the rebar control.

CReBarCtrl::GetDropTarget

Retrieves a rebar control's IDropTarget interface pointer.

CReBarCtrl::GetExtendedStyle

Gets the extended style of the current rebar control.

CReBarCtrl::GetImageList

Retrieves the image list associated with a rebar control.

CReBarCtrl::GetPalette

Retrieves the rebar control's current palette.

CReBarCtrl::GetRect

Retrieves the bounding rectangle for a given band in a rebar control.

CReBarCtrl::GetRowCount

Retrieves the number of band rows in a rebar control.

CReBarCtrl::GetRowHeight

Retrieves the height of a specified row in a rebar control.

CReBarCtrl::GetTextColor

Retrieves a rebar control's default text color.

CReBarCtrl::GetToolTips

Retrieves the handle to any tool tip control associated with the rebar control.

CReBarCtrl::HitTest

Determines which portion of a rebar band is at a given point on the screen, if a rebar band exists at that point.

CReBarCtrl::IDToIndex

Converts a band identifier (ID) to a band index in a rebar control.

CReBarCtrl::InsertBand

Inserts a new band in a rebar control.

CReBarCtrl::MaximizeBand

Resizes a band in a rebar control to its largest size.

CReBarCtrl::MinimizeBand

Resizes a band in a rebar control to its smallest size.

CReBarCtrl::MoveBand

Moves a band from one index to another.

CReBarCtrl::PushChevron

Programmatically pushes a chevron.

CReBarCtrl::RestoreBand

Resizes a band in a rebar control to its ideal size.

CReBarCtrl::SetBandInfo

Sets characteristics of an existing band in a rebar control.

CReBarCtrl::SetBandWidth

Sets the width of the specified docked band in the current rebar control.

CReBarCtrl::SetBarInfo

Sets the characteristics of a rebar control.

CReBarCtrl::SetBkColor

Sets a rebar control's default background color.

CReBarCtrl::SetColorScheme

Sets the color scheme for the buttons on a rebar control.

CReBarCtrl::SetExtendedStyle

Sets the extended styles for the current rebar control.

CReBarCtrl::SetImageList

Sets a rebar control's image list.

CReBarCtrl::SetOwner

Sets a rebar control's owner window.

CReBarCtrl::SetPalette

Sets the rebar control's current palette.

CReBarCtrl::SetTextColor

Sets a rebar control's default text color.

CReBarCtrl::SetToolTips

Associates a tool tip control with the rebar control.

CReBarCtrl::SetWindowTheme

Sets the visual style of the rebar control.

CReBarCtrl::ShowBand

Shows or hides a given band in a rebar control.

CReBarCtrl::SizeToRect

Fits a rebar control to a specified rectangle.

Remarks

The application in which the rebar control resides assigns the child window contained by the rebar control to the rebar band. The child window is usually another common control.

Rebar controls contain one or more bands. Each band can contain a combination of a gripper bar, a bitmap, a text label, and a child window. The band can contain only one of each of these items.

The rebar control can display the child window over a specified background bitmap. All rebar control bands can be resized, except those that use the RBBS_FIXEDSIZE style. As you reposition or resize a rebar control band, the rebar control manages the size and position of the child window assigned to that band. To resize or change the order of bands within the control, click and drag a band's gripper bar.

The following illustration shows a rebar control that has three bands:

  • Band 0 contains a flat, transparent toolbar control.

  • Band 1 contains both transparent standard and transparent dropdown buttons.

  • Band 2 contains a combo box and four standard buttons.

    RebarMenuSample screenshot

Rebar control

Rebar controls support:

  • Image lists.

  • Message-handling.

  • Custom draw functionality.

  • A variety of control styles in addition to standard window styles. For a list of these styles, see Rebar Control Styles in the Windows SDK.

For more information, see Using CReBarCtrl.

Inheritance Hierarchy

CObject

CCmdTarget

CWnd

CReBarCtrl

Requirements

Header: afxcmn.h

See Also

Reference

CWnd Class

Hierarchy Chart