コード例 #1
0
	/** Moves a band from one index to another. The rebar band to move is
	identified by the ID of the band or by the zero based index of the band.
	This method will first translate the nID parameter to the corresponding
	band index. If there is no corresponding band index, the method will
	assume that nID is a band index. The nIndexTo paramater is the new index.*/
	VBOOL		MoveBand(VUINT nID, VUINT nIndexTo) const
	{
		VUINT nCount =	GetBandCount();
		VUINT nIndex =	BandIDToIndexOrID(nID);

		/* Not valid to move to a band larger than the number created!*/
		VASSERT(nIndexTo < nCount)

		/* Move the band to the specified index.*/
		if ( nIndexTo < nCount )
			return VWINDOW_SMB2(RB_MOVEBAND, nIndex, nIndexTo);

		return VFALSE;
	}
コード例 #2
0
ファイル: CoolBar.cpp プロジェクト: CCChaos/RyzomCore
//////////////////
// Set the background bitmap. This sets the background for all bands and
// sets the RBBS_FIXEDBMP style so it looks like one background.
//
void CCoolBar::SetBackgroundBitmap(CBitmap* pBitmap)
{
	HBITMAP hbm = (HBITMAP)pBitmap->GetSafeHandle();
	CRebarBandInfo rbbi;
	int n = GetBandCount();
	for (int i=0; i< n; i++) {
		rbbi.fMask  = RBBIM_STYLE;
		GetBandInfo(i, &rbbi);
		rbbi.fMask  |= RBBIM_BACKGROUND;
		rbbi.fStyle |= RBBS_FIXEDBMP;
		rbbi.hbmBack = hbm;
		SetBandInfo(i, &rbbi);
	}
}