There is no good way to change the background color in a disabled listview. But the usual workaround of placing the listview in a child window and then disable the child window instead of the listview works well in this situation:
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
Example()
Func Example()
Local $hGui = GUICreate("listview items", 220, 250, 100, 200, -1)
GUISetBkColor(0x00151515)
Local $hChild = GUICreate( "", 200, 150, 10, 10, $WS_POPUP, $WS_EX_MDICHILD, $hGui )
Local $idListview = GUICtrlCreateListView("col1 |col2|col3 ", 0, 0, 200, 150)
Local $idItem1 = GUICtrlCreateListViewItem("item2|col22|col23", $idListview)
Local $idItem2 = GUICtrlCreateListViewItem("item1|col12|col13", $idListview)
Local $idItem3 = GUICtrlCreateListViewItem("item3|col32|col33", $idListview)
GUICtrlSetColor($idListview, 0x0000FF00)
GUICtrlSetBkColor($idListview, 0x00151515)
GUISetState( @SW_SHOW, $hChild )
GUISwitch( $hGui )
Local $idButton = GUICtrlCreateButton("Disable /enable", 45, 170, 120, 20)
Local $iState
GUISetState(@SW_SHOW)
GUICtrlSetData($idItem2, "ITEM1")
GUICtrlSetData($idItem3, "||COL33")
$iState = 0
GUISetState( @SW_DISABLE, $hChild )
;GUICtrlSetState($idListview, 128)
; Loop until the user exits.
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $idButton
IF $iState = 0 Then
;GUICtrlSetState($idListview, 64)
GUISetState( @SW_ENABLE, $hChild )
$iState = 1
Else
;GUICtrlSetState($idListview, 128)
Local $aIndex = _GUICtrlListView_GetSelectedIndices( $idListview, True )
_GUICtrlListView_SetItemSelected( $idListview, $aIndex[0] ? $aIndex[1] : -1, False )
GUISetState( @SW_DISABLE, $hChild )
$iState = 0
EndIf
EndSwitch
WEnd
EndFunc
When the child window becomes disabled, the listview is also disabled. But the background color does not change.