int bits = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0); if (hBitmap != 0) { bits &= ~(OS.TVS_EX_DOUBLEBUFFER | OS.TVS_EX_FADEINOUTEXPANDOS); } else { bits |= OS.TVS_EX_DOUBLEBUFFER | OS.TVS_EX_FADEINOUTEXPANDOS; } OS.SendMessage (handle, OS.TVM_SETEXTENDEDSTYLE, 0, bits);
setExplorerTheme (false);
void setBackgroundImage (int hBitmap) {	super.setBackgroundImage (hBitmap);	if (EXPLORER_THEME) {		if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0)) {			int bits = OS.SendMessage (handle, OS.TVM_GETEXTENDEDSTYLE, 0, 0);			if (hBitmap != 0) {				bits &= ~(OS.TVS_EX_DOUBLEBUFFER | OS.TVS_EX_FADEINOUTEXPANDOS);			} else {				bits |= OS.TVS_EX_DOUBLEBUFFER | OS.TVS_EX_FADEINOUTEXPANDOS;			}			OS.SendMessage (handle, OS.TVM_SETEXTENDEDSTYLE, 0, bits);		}	}	if (hBitmap != 0) {		/*		* Feature in Windows.  If TVM_SETBKCOLOR is never		* used to set the background color of a tree, the		* background color of the lines and the plus/minus		* will be drawn using the default background color,		* not the HBRUSH returned from WM_CTLCOLOR.  The fix		* is to set the background color to the default (when		* it is already the default) to make Windows use the		* brush.		*/		if (OS.COMCTL32_MAJOR < 6) {			if (OS.SendMessage (handle, OS.TVM_GETBKCOLOR, 0, 0) == -1) {				OS.SendMessage (handle, OS.TVM_SETBKCOLOR, 0, -1);			}		}		OS.SendMessage (handle, OS.TVM_SETBKCOLOR, 0, -1);	} else {		Control control = findBackgroundControl ();		if (control == null) control = this;		if (control.backgroundImage == null) {			setBackgroundPixel (control.getBackgroundPixel ());		}	}	/*	* Feature in Windows.  When the tree has the style	* TVS_FULLROWSELECT, the background color for the	* entire row is filled when an item is painted,	* drawing on top of the background image.  The fix	* is to clear TVS_FULLROWSELECT when a background	* image is set.	*/	updateFullSelection ();}