int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);
public void clearAll () {	checkWidget ();	int count = OS.SendMessage (handle, OS.LVM_GETITEMCOUNT, 0, 0);	LVITEM lvItem = null;	boolean cleared = false;	for (int i=0; i<count; i++) {		TableItem item = items [i];		if (item != null) {			cleared = true;			item.clear ();			/*			* Bug in Windows.  Despite the fact that every item in the			* table always has LPSTR_TEXTCALLBACK, Windows caches the			* bounds for the selected items.  This means that 			* when you change the string to be something else, Windows			* correctly asks you for the new string but when the item			* is selected, the selection draws using the bounds of the			* previous item.  The fix is to reset LPSTR_TEXTCALLBACK			* even though it has not changed, causing Windows to flush			* cached bounds.			*/			if ((style & SWT.VIRTUAL) == 0 && item.cached) {				if (lvItem == null) {					lvItem = new LVITEM ();					lvItem.mask = OS.LVIF_TEXT | OS.LVIF_INDENT;					lvItem.pszText = OS.LPSTR_TEXTCALLBACK;				}				lvItem.iItem = i;				OS.SendMessage (handle, OS.LVM_SETITEM, 0, lvItem);				item.cached = false;			}		}	}	if (cleared) {		if (!ignoreRedraw && drawCount == 0 && OS.IsWindowVisible (handle)) {			OS.SendMessage (handle, OS.LVM_REDRAWITEMS, 0, count - 1);		}		setScrollWidth (null, false);	}}