if (EXPLORER_THEME) { if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) { int bits = transparent ? OS.LVS_EX_TRANSPARENTBKGND : 0; OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, OS.LVS_EX_TRANSPARENTBKGND, bits);  if ((sortDirection & (SWT.UP | SWT.DOWN)) != 0) { if (sortColumn != null && !sortColumn.isDisposed ()) { int column = transparent ? -1 : indexOf (sortColumn); OS.SendMessage (handle, OS.LVM_SETSELECTEDCOLUMN, column, 0); if (column != OS.SendMessage (handle, OS.LVM_SETSELECTEDCOLUMN, column, 0)) {  OS.InvalidateRect (handle, null, true); } } } return; } }
void setBackgroundTransparent (boolean transparent) {	/*	* Bug in Windows.  When the table has the extended style	* LVS_EX_FULLROWSELECT and LVM_SETBKCOLOR is used with	* CLR_NONE to make the table transparent, Windows draws	* a black rectangle around the first column.  The fix is	* clear LVS_EX_FULLROWSELECT.	* 	* Feature in Windows.  When LVM_SETBKCOLOR is used with	* CLR_NONE and LVM_SETSELECTEDCOLUMN is used to select	* a column, Windows fills the column with the selection	* color, drawing on top of the background image and any	* other custom drawing.  The fix is to clear the selected	* column.	*/	int oldPixel = OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0);	if (transparent) {		if (oldPixel != OS.CLR_NONE) {			/*			* Bug in Windows.  When the background color is changed,			* the table does not redraw until the next WM_PAINT.  The			* fix is to force a redraw.			*/			OS.SendMessage (handle, OS.LVM_SETBKCOLOR, 0, OS.CLR_NONE);			OS.SendMessage (handle, OS.LVM_SETTEXTBKCOLOR, 0, OS.CLR_NONE);			OS.InvalidateRect (handle, null, true);						/* Clear LVS_EX_FULLROWSELECT */			if ((style & SWT.FULL_SELECTION) != 0) {				int bits = OS.LVS_EX_FULLROWSELECT;				OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, bits, 0);			}			/* Clear LVM_SETSELECTEDCOLUMN */			if ((sortDirection & (SWT.UP | SWT.DOWN)) != 0) {				if (sortColumn != null && !sortColumn.isDisposed ()) {					OS.SendMessage (handle, OS.LVM_SETSELECTEDCOLUMN, -1, 0);					/* 					* Bug in Windows.  When LVM_SETSELECTEDCOLUMN is set, Windows					* does not redraw either the new or the previous selected column.					* The fix is to force a redraw.					*/					OS.InvalidateRect (handle, null, true);				}			}		}	} else {		if (oldPixel == OS.CLR_NONE) {			Control control = findBackgroundControl ();			if (control == null) control = this;			if (control.backgroundImage == null) {				setBackgroundPixel (control.getBackgroundPixel ());			}			/* Set LVS_EX_FULLROWSELECT */			if ((style & SWT.FULL_SELECTION) != 0) {				if (!hooks (SWT.EraseItem) && !hooks (SWT.PaintItem)) {					int bits = OS.LVS_EX_FULLROWSELECT;					OS.SendMessage (handle, OS.LVM_SETEXTENDEDLISTVIEWSTYLE, bits, bits);				}			}			/* Set LVM_SETSELECTEDCOLUMN */			if ((sortDirection & (SWT.UP | SWT.DOWN)) != 0) {				if (sortColumn != null && !sortColumn.isDisposed ()) {					int column = indexOf (sortColumn);					if (column != -1) {						OS.SendMessage (handle, OS.LVM_SETSELECTEDCOLUMN, column, 0);						/* 						* Bug in Windows.  When LVM_SETSELECTEDCOLUMN is set, Windows						* does not redraw either the new or the previous selected column.						* The fix is to force a redraw.						*/						OS.InvalidateRect (handle, null, true);					}				}			}		}	}}