#Include Once "window9.bi"

Function GetItemCountListView(ByVal gadget As Integer) As Integer Export
	Dim szClass As String = GetClassName_(GadgetID(gadget))
	If szClass = "ExplorerGadget" Then
		Return SendMessage(GetProp(GadgetID(gadget),"EXPLORERGADGETLISTVIEWWINDOW"),4100,0,0)
	Else
		Return SendMessage(GadgetID(gadget),4100,0,0)
	EndIf
End Function
