width -= margins.cxLeftWidth; width -= margins.cxRightWidth;
cx -= margins.cxLeftWidth + margins.cxRightWidth;
public void setSize (int width, int height) {	checkWidget ();	int index = parent.indexOf (this);	if (index == -1) return;	width = Math.max (0, width);	height = Math.max (0, height);	int hwnd = parent.handle;	REBARBANDINFO rbBand = new REBARBANDINFO ();	rbBand.cbSize = REBARBANDINFO.sizeof;		/* Get the child size fields first so we don't overwrite them. */	rbBand.fMask = OS.RBBIM_CHILDSIZE | OS.RBBIM_IDEALSIZE;	OS.SendMessage (hwnd, OS.RB_GETBANDINFO, index, rbBand);		/* Set the size fields we are currently modifying. */	if (!ideal) rbBand.cxIdeal = Math.max (0, width - parent.getMargin (index));	if (!minimum) rbBand.cyMinChild = height;	rbBand.cyChild = rbBand.cyMaxChild = height;		/*	* Do not set the size for the last item on the row.	*/		if (!parent.isLastItemOfRow (index)) {		if (OS.COMCTL32_MAJOR >= 6) {			MARGINS margins = new MARGINS ();			OS.SendMessage (hwnd, OS.RB_GETBANDMARGINS, 0, margins);			width -= margins.cxLeftWidth;			width -= margins.cxRightWidth;		}		int separator = (parent.style & SWT.FLAT) == 0 ? CoolBar.SEPARATOR_WIDTH : 0;		rbBand.cx = width - separator;		rbBand.fMask |= OS.RBBIM_SIZE;	}	OS.SendMessage (hwnd, OS.RB_SETBANDINFO, index, rbBand);}