if (layout != null) { return super.computeSize (wHint, hHint, changed); }
public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget ();	if (layout != null) {		return super.computeSize (wHint, hHint, changed);	}	int width = 0, height = 0;	if ((style & SWT.VERTICAL) != 0) {		RECT rect = new RECT ();		TBBUTTON lpButton = new TBBUTTON ();		int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);		for (int i=0; i<count; i++) {			OS.SendMessage (handle, OS.TB_GETITEMRECT, i, rect);			height = Math.max (height, rect.bottom);			OS.SendMessage (handle, OS.TB_GETBUTTON, i, lpButton);			if ((lpButton.fsStyle & OS.BTNS_SEP) == 0) {				width = Math.max (width, rect.right);			}		}	} else {		RECT oldRect = new RECT ();		OS.GetWindowRect (handle, oldRect);		int oldWidth = oldRect.right - oldRect.left;		int oldHeight = oldRect.bottom - oldRect.top;		int border = getBorderWidth ();		int newWidth = wHint == SWT.DEFAULT ? 0x3FFF : wHint + border * 2;		int newHeight = hHint == SWT.DEFAULT ? 0x3FFF : hHint + border * 2;		boolean redraw = drawCount == 0 && OS.IsWindowVisible (handle);		ignoreResize = true;		if (redraw) OS.UpdateWindow (handle);		int flags = OS.SWP_NOACTIVATE | OS.SWP_NOMOVE | OS.SWP_NOREDRAW | OS.SWP_NOZORDER;		SetWindowPos (handle, 0, 0, 0, newWidth, newHeight, flags);		int count = OS.SendMessage (handle, OS.TB_BUTTONCOUNT, 0, 0);		if (count != 0) {			RECT rect = new RECT ();			OS.SendMessage (handle, OS.TB_GETITEMRECT, count - 1, rect);			width = Math.max (width, rect.right);			height = Math.max (height, rect.bottom);		}		SetWindowPos (handle, 0, 0, 0, oldWidth, oldHeight, flags);		if (redraw) OS.ValidateRect (handle, null);		ignoreResize = false;	}		/*	* From the Windows SDK for TB_SETBUTTONSIZE:	*	*   "If an application does not explicitly	*	set the button size, the size defaults	*	to 24 by 22 pixels". 	*/	if (width == 0) width = DEFAULT_WIDTH;	if (height == 0) height = DEFAULT_HEIGHT;	if (wHint != SWT.DEFAULT) width = wHint;	if (hHint != SWT.DEFAULT) height = hHint;	Rectangle trim = computeTrim (0, 0, width, height);	width = trim.width;  height = trim.height;	return new Point (width, height);}