int flags = OS.DT_CALCRECT;
int flags = OS.DT_CALCRECT | OS.DT_EDITCONTROL | OS.DT_EXPANDTABS;
public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget ();	int width = 0, height = 0;	int border = getBorderWidth ();	if ((style & SWT.SEPARATOR) != 0) {		int lineWidth = OS.GetSystemMetrics (OS.SM_CXBORDER);		if ((style & SWT.HORIZONTAL) != 0) {			width = DEFAULT_WIDTH;  height = lineWidth * 2;		} else {			width = lineWidth * 2; height = DEFAULT_HEIGHT;		}		if (wHint != SWT.DEFAULT) width = wHint;		if (hHint != SWT.DEFAULT) height = hHint;		width += border * 2; height += border * 2;		return new Point (width, height);	}	/*	* NOTE: SS_BITMAP and SS_ICON are not single bit	* masks so it is necessary to test for all of the	* bits in these masks.	*/	int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);	boolean isBitmap = (bits & OS.SS_BITMAP) == OS.SS_BITMAP;	boolean isIcon = (bits & OS.SS_ICON) == OS.SS_ICON;	if (isBitmap || isIcon) {		if (image != null) {			Rectangle rect = image.getBounds();			width = rect.width;			height = rect.height;		}	} else {		int hDC = OS.GetDC (handle);		int newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);		int oldFont = OS.SelectObject (hDC, newFont);		RECT rect = new RECT ();		int flags = OS.DT_CALCRECT;		if ((style & SWT.WRAP) != 0 && wHint != SWT.DEFAULT) {			flags |= OS.DT_WORDBREAK;			rect.right = wHint;		}		int length = OS.GetWindowTextLength (handle);		TCHAR buffer = new TCHAR (getCodePage (), length + 1);		OS.GetWindowText (handle, buffer, length + 1);		OS.DrawText (hDC, buffer, length, rect, flags);		width = rect.right - rect.left;		height = rect.bottom - rect.top;		if (height == 0) {			TEXTMETRIC tm = new TEXTMETRIC ();			OS.GetTextMetrics (hDC, tm);			height = tm.tmHeight;		}		if (newFont != 0) OS.SelectObject (hDC, oldFont);		OS.ReleaseDC (handle, hDC);	}	if (wHint != SWT.DEFAULT) width = wHint;	if (hHint != SWT.DEFAULT) height = hHint;	width += border * 2; height += border * 2;	/* 	* Feature in WinCE PPC.  Text labels have a trim	* of one pixel wide on the right and left side.	* The fix is to increase the size.	*/	if (OS.IsWinCE) {		if (!isBitmap && !isIcon) width += 2;	}	return new Point (width, height);}