CReBarCtrl::InsertBand

BOOL InsertBand( UINT uIndex, REBARBANDINFO* prbbi );

Return Value

Nonzero if successful; otherwise zero.

Parameters

uIndex

Zero-based index of the location where the band will be inserted. If you set this parameter to -1, the control will add the new band at the last location.

prbbi

A pointer to a REBARBANDINFO structure that defines the band to be inserted. You must set the cbSize member of this structure to sizeof(REBARBANDINFO) before calling this function.

Remarks

This member function implements the behavior of the Win32 message RB_INSERTBAND, as described in the Platform SDK.

Example

LPREBARBANDINFO prbbi =
    (LPREBARBANDINFO)alloca(sizeof(REBARBANDINFO));
prbbi->cbSize = sizeof(REBARBANDINFO);

LPTSTR lpszText = (LPTSTR)alloca(80);
prbbi->lpText = lpszText;
prbbi->cch = 80;

prbbi->fMask = RBBIM_BACKGROUND | RBBIM_CHILD |
    RBBIM_CHILDSIZE | RBBIM_COLORS | RBBIM_HEADERSIZE |
    RBBIM_IDEALSIZE | RBBIM_ID | RBBIM_IMAGE |
    RBBIM_LPARAM | RBBIM_SIZE | RBBIM_STYLE | RBBIM_TEXT;

m_wndReBar.GetReBarCtrl().GetBandInfo(1, prbbi);

m_wndReBar.GetReBarCtrl().InsertBand(2, prbbi);   

CReBarCtrl OverviewClass MembersHierarchy Chart