int result = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, -1, bits | 0xFFFF0000); int width = result & 0xFFFF;
public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget ();	if (fixScrollWidth) setScrollWidth (null, true);	//This code is intentionally commented//	if (itemHeight == -1 && hooks (SWT.MeasureItem)) {//		int i = 0;//		TableItem item = items [i];//		if (item != null) {//			int hDC = OS.GetDC (handle);//			int oldFont = 0, newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);//			if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);//			int index = 0, count = Math.max (1, columnCount);//			while (index < count) {//				int hFont = item.cellFont != null ? item.cellFont [index] : -1;//				if (hFont == -1) hFont = item.font;//				if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);//				sendMeasureItemEvent (item, i, index, hDC);//				if (hFont != -1) hFont = OS.SelectObject (hDC, hFont);//				if (isDisposed () || item.isDisposed ()) break;//				index++;//			}//			if (newFont != 0) OS.SelectObject (hDC, oldFont);//			OS.ReleaseDC (handle, hDC);//		}//	}	int hwndHeader = OS.SendMessage (handle, OS.LVM_GETHEADER, 0, 0);	RECT rect = new RECT ();						OS.GetWindowRect (hwndHeader, rect);	int width = 0, height = rect.bottom - rect.top;	if (columnCount == 0) {		width = getScrollWidth ();	} else {		int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0);		for (int i=0; i<count; i++) {			width += OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, i, 0);		}	}	int empty = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 0, 0);	int oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);	int itemHeight = (oneItem >> 16) - (empty >> 16);	height += OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0) * itemHeight;	if (width == 0) width = DEFAULT_WIDTH;	if (height == 0) height = DEFAULT_HEIGHT;	if (wHint != SWT.DEFAULT) width = wHint;	if (hHint != SWT.DEFAULT) height = hHint;	int border = getBorderWidth ();	width += border * 2;  height += border * 2;	if ((style & SWT.V_SCROLL) != 0) {		width += OS.GetSystemMetrics (OS.SM_CXVSCROLL);	}	if ((style & SWT.H_SCROLL) != 0) {		height += OS.GetSystemMetrics (OS.SM_CYHSCROLL);	}	return new Point (width, height);}