if ((style & SWT.DOUBLE_BUFFERED) != 0) { int bits = OS.SendMessage (handle, OS.LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); if ((bits & OS.LVS_EX_DOUBLEBUFFER) == 0) { GC gc = null; int paintDC = 0; PAINTSTRUCT ps = new PAINTSTRUCT (); if (hooks (SWT.Paint)) { GCData data = new GCData (); data.ps = ps; data.hwnd = handle; gc = GC.win32_new (this, data); paintDC = gc.handle; } else { paintDC = OS.BeginPaint (handle, ps); }      forceResize (); RECT rect = new RECT (); OS.GetClientRect (handle, rect); int x = rect.left, y = rect.top; int width = rect.right - rect.left; int height = rect.bottom - rect.top;  int hDC = OS.CreateCompatibleDC (paintDC); int hBitmap = OS.CreateCompatibleBitmap (paintDC, width, height); int hOldBitmap = OS.SelectObject (hDC, hBitmap); int code = callWindowProc (handle, OS.WM_PAINT, hDC, 0); OS.BitBlt (paintDC, x, y, width, height, hDC, 0, 0, OS.SRCCOPY); OS.SelectObject (hDC, hOldBitmap); OS.DeleteObject (hBitmap); OS.DeleteObject (hDC); if (hooks (SWT.Paint)) { Event event = new Event (); event.gc = gc; event.x = ps.left; event.y = ps.top; event.width = ps.right - ps.left; event.height = ps.bottom - ps.top; sendEvent (SWT.Paint, event);  event.gc = null; gc.dispose (); } else { OS.EndPaint (handle, ps); } return new LRESULT (code); } }
LRESULT WM_PAINT (int wParam, int lParam) {	if (!ignoreShrink) {		/* Resize the item array to match the item count */		int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);		if (items.length > 4 && items.length - count > 3) {			int length = Math.max (4, (count + 3) / 4 * 4);			TableItem [] newItems = new TableItem [length];			System.arraycopy (items, 0, newItems, 0, count);			items = newItems;		}	}	if (fixScrollWidth) setScrollWidth (null, true);	return super.WM_PAINT (wParam, lParam);}