margin += rect.left + rect.right;
if ((style & SWT.VERTICAL) != 0) { margin += rect.top + rect.bottom; } else { margin += rect.left + rect.right; }
int getMargin (int index) {	int margin = 0;	if (OS.COMCTL32_MAJOR >= 6) {		MARGINS margins = new MARGINS ();		OS.SendMessage (handle, OS.RB_GETBANDMARGINS, 0, margins);		margin += margins.cxLeftWidth + margins.cxRightWidth;	}	RECT rect = new RECT ();	OS.SendMessage (handle, OS.RB_GETBANDBORDERS, index, rect);	if ((style & SWT.FLAT) != 0) {		/*		* Bug in Windows.  When the style bit  RBS_BANDBORDERS is not set		* the rectangle returned by RBS_BANDBORDERS is four pixels too small.		* The fix is to add four pixels to the result.		*/			margin += rect.left + 4;	} else {		margin += rect.left + rect.right; 	}	if ((style & SWT.FLAT) == 0) {		if (!isLastItemOfRow (index)) {			margin += CoolBar.SEPARATOR_WIDTH;		}	}	return margin;}