Buggy code:
drawBackground ( hDC , fullRect , clrSortBk ) ; } int nSavedDC = OS . SaveDC ( hDC ) ; GCData data = new GCData ( ) ; data . device = display ; if ( selected && ( explorerTheme ) ) { data . foreground = OS . GetSysColor ( COLOR_WINDOWTEXT ) ; } else { data . foreground = OS . GetTextColor ( hDC ) ; } data . background = OS . GetBkColor ( hDC ) ; if ( ! selected ) { if ( clrText != ( - 1 ) ) data . foreground = clrText ; if ( clrTextBk != ( - 1 ) ) data . background = clrTextBk ; } data . uiState = ( ( int ) ( OS . SendMessage ( handle , WM_QUERYUISTATE , 0 , 0 ) ) ) ; if ( hFont != ( - 1 ) ) data . hFont = hFont ; GC gc = GC . win32_new ( hDC , data ) ; Event event = new Event ( ) ; event . index = index ; event . item = item ; event . gc = gc ; event . detail |= SWT . FOREGROUND ; if ( clrTextBk != ( - 1 ) ) event . detail |= SWT . BACKGROUND ; if ( hot ) event . detail |= SWT . HOT ; if ( selected ) event . detail |= SWT . SELECTED ; if ( ! ( explorerTheme ) ) { if ( ( OS . SendMessage ( handle , TVM_GETNEXTITEM , TVGN_CARET , 0 ) ) == ( nmcd . dwItemSpec ) ) { if ( ( handle ) == ( OS . GetFocus ( ) ) ) { int uiState = ( ( int ) ( OS . SendMessage ( handle , WM_QUERYUISTATE , 0 , 0 ) ) ) ; if ( ( uiState & ( OS . UISF_HIDEFOCUS ) ) == 0 ) event . detail |= SWT . FOCUSED ; } } } event . x = cellRect . left ; event . y = cellRect . top ; event . width = ( cellRect . right ) - ( cellRect . left ) ; event . height = ( cellRect . bottom ) - ( cellRect . top ) ; gc . setClipping ( event . x , event . y , event . width , event . height ) ; sendEvent ( EraseItem , event ) ; event . gc = null ; int newTextClr = data . foreground ; gc . dispose ( ) ; OS . RestoreDC ( hDC , nSavedDC ) ; if ( ( isDisposed ( ) ) || ( item . isDisposed ( ) ) ) return null ; if ( event . doit ) { ignoreDrawForeground = ( ( event . detail ) & ( SWT . FOREGROUND ) ) == 0 ; ignoreDrawBackground = ( ( event . detail ) & ( SWT . BACKGROUND ) ) == 0 ; ignoreDrawSelection = ( ( event . detail ) & ( SWT . SELECTED ) ) == 0 ; ignoreDrawFocus = ( ( event . detail ) & ( SWT . FOCUSED ) ) == 0 ; ignoreDrawHot = ( ( event . detail ) & ( SWT . HOT ) ) == 0 ; } else { ignoreDrawForeground = ignoreDrawBackground = ignoreDrawSelection = ignoreDrawFocus = ignoreDrawHot = true ; } if ( selected && ( ignoreDrawSelection ) ) ignoreDrawHot = true ; if ( ( ! ( ignoreDrawBackground ) ) && ( clrTextBk != ( - 1 ) ) ) { boolean draw = ( ! selected ) && ( ! hot ) ; if ( ( ! ( explorerTheme ) ) && selected ) draw = ! ( ignoreDrawSelection ) ; if ( draw ) { if ( count == 0 ) { if ( ( ( style ) & ( SWT . FULL_SELECTION ) ) != 0 ) { fillBackground ( hDC , clrTextBk , rect ) ; } else { <START_BUG> RECT textRect = item . getBounds ( index , true , false , true , false , true , hDC ) ; <END_BUG> fillBackground ( hDC , clrTextBk , textRect ) ; } } else { fillBackground ( hDC , clrTextBk , cellRect ) ; } } } if ( ignoreDrawSelection ) ignoreFullSelection = true ; if ( ( ! ( ignoreDrawSelection ) ) || ( ! ( ignoreDrawHot ) ) ) { if ( ( ! selected ) && ( ! hot ) ) { selectionForeground = clrText = OS . GetSysColor ( COLOR_HIGHLIGHTTEXT ) ; } if ( ! ( explorerTheme ) ) { if ( ( ( style ) & ( SWT . FULL_SELECTION ) ) != 0 ) { if ( ( ( ( style ) & ( SWT . FULL_SELECTION ) ) != 0 ) && ( count == 0 ) ) { fillBackground ( hDC , OS . GetBkColor ( hDC ) , rect ) ; } else { fillBackground ( hDC , OS . GetBkColor ( hDC ) , cellRect ) ; } } else { RECT textRect = item . getBounds ( index , true , false , false , false , true , hDC ) ; fillBackground ( hDC , OS . GetBkColor ( hDC ) , textRect ) ; } } } else { if ( selected || hot ) { selectionForeground = clrText = newTextClr ; ignoreDrawSelection = ignoreDrawHot = true ; } if ( explorerTheme ) { nmcd . uItemState |= OS . CDIS_DISABLED ; int newColor = ( clrText == ( - 1 ) ) ? getForegroundPixel ( ) : clrText ; if ( ( nmcd . clrText ) == newColor ) { nmcd . clrText |= 536870912 ; if ( ( nmcd . clrText ) == newColor ) nmcd . clrText &= ~ 536870912 ;

Fix:
RECT textRect = item . getBounds ( index , true , false , false , false , true , hDC ) ;