REBARBANDINFO

This structure contains information that defines a band in a rebar control.

At a Glance

Header file: Commctrl.h
Windows CE versions: 2.0 and later

Syntax

typedef struct tagREBARBANDINFO{
UINT cbSize;
UINT fMask;
UINT fStyle;
COLORREF clrFore;
COLORREF clrBack;
LPTSTR lpText;
UINT cch;
int iImage;
HWND hwndChild;
UINT cxMinChild;
UINT cyMinChild;
UINT cx;
HBITMAP hbmBack;
UINT wID;
UINT cyChild;
UINT cyMaxChild;
UINT cyIntegral;
UINT cxIdeal;
LPARAM lParam;
} REBARBANDINFO, FAR *LPREBARBANDINFO;

Members

cbSize

Size of this structure, in bytes. The application must fill this member before sending any messages that use the address of this structure as a parameter.

fMask

Flags that indicate which members of this structure are valid or must be filled. It can be a combination of the following values:

Value Description
RBBIM_BACKGROUND The hbmBack member is valid or must be filled.
RBBIM_CHILD The hwndChild member is valid or must be filled.
RBBIM_CHILDSIZE The cxMinChild and cyMinChild members are valid or must be filled.
RBBIM_COLORS The clrFore and clrBack members are valid or must be filled.
RBBIM_IDEALSIZE The cxIdeal member is valid or must be filled.
RBBIM_ID The wID member is valid or must be filled.
RBBIM_IMAGE The iImage member is valid or must be filled.
RBBIM_LPARAM The lParam member is valid or must be filled.
RBBIM_SIZE The cx member is valid or must be filled.
RBBIM_STYLE The fStyle member is valid or must be filled.
RBBIM_TEXT The lpText member is valid or must be filled.

fStyle

Flags that specify the band style. It can be a combination of the following values:

Value Description
RBBS_BREAK The band is on a new line.
RBBS_CHILDEDGE The band has an edge at the top and bottom of the child window.
RBBS_FIXEDBMP The background bitmap does not move when the band is resized.
RBBS_FIXEDSIZE The band cannot be sized. With this style, the sizing grip is not displayed on the band.
RBBS_GRIPPERALWAYS The band will always have sizing grip, even if it is the only band in the rebar.
RBBS_HIDDEN The band will not be visible.
RBBS_NOVERT The band is not displayed when the rebar control uses the CCS_VERT style.
RBBS_VARIABLEHEIGHT The band can be resized by the rebar control. cyIntegral and cyMaxChild affect how the rebar will resize the band.

clrFore and clrBack

Band foreground and background colors. If hbmBack specifies a background bitmap, these members are ignored.

lpText

Long pointer to a buffer that contains the display text for the band. If band information is being requested from the control and RBBIM_TEXT is specified in fMask, this member must be initialized to the address of the buffer that will receive the text.

cch

Size of the buffer at lpText, in bytes. If information is not being requested from the control, this member is ignored.

iImage

Zero-based index of any image that should be displayed in the band, if any. The image list is set using the RB_SETBARINFO message.

hwndChild

Handle to the child window contained in the band, if any.

cxMinChild

Minimum length of the child window, in pixels. The band cannot be sized smaller than this value.

cyMinChild

Minimum thickness of the child window, in pixels. The band cannot be sized smaller than this value.

cx

Length of the band, in pixels.

hbmBack

Handle to a bitmap that is used as the background for this band.

wID

Unsigned integer that the control uses to identify this band for Custom Draw notification messages. This value may be used for additional purposes in the future.

cyChild

Initial height of the band, in pixels. This member is ignored unless the RBBS_VARIABLEHEIGHT style is specified.

cyMaxChild

Maximum height of the band, in pixels. This member is ignored unless the RBBS_VARIABLEHEIGHT style is specified.

cyIntegral

Specifies the step value by which the band can grow or shrink, in pixels. If the band is resized, it will be resized in steps specified by this value. This member is ignored unless the RBBS_VARIABLEHEIGHT style is specified.

cxIdeal

Specifies the ideal width of the band, in pixels. If the band is maximized to the ideal width (see RB_MAXIMIZEBAND), the rebar control will attempt to make the band this width.

lParam

Specifies a 32-bit application-defined value.

Remarks

The cxMinChild, cyMinChild, and cx members provide information on dimensions relative to the orientation of the control. That is, for a horizontal rebar control, cxMinChild and cx are horizontal measurements and cyMinChild is a vertical measurement. However, if the control uses the CCS_VERT style, cxMinChild and cx are vertical measurements and cyMinChild is a horizontal measurement.