#Include once "window9.bi"

Function ListViewGadget(ByVal gadget As Integer, ByVal x As Integer,ByVal y As Integer,ByVal Width_ As Integer,ByVal height_ As Integer,ByVal StyleListView As Integer=0,ByVal par As Integer= LVS_ICON  Or LVS_REPORT,ByVal par2 As Integer=0,ByVal SizeIcon As Integer=16, ByVal StyleIcon As Integer=LVSIL_SMALL	) As HWND Export
  Var hhh = CreateWindowEx( par2, "SysListView32", "", WS_CHILD Or WS_VISIBLE  Or par , x, y,Width_,height_,GETGURRENTAL(),Cast(HMENU,gadget),0,0)
  ADDIN9999(gadget,hhh)
  ColorAdd(hhh,16777215,0)
  COOLOOR(16777215,0)
  If GGF()<>0 Then
    SendMessage(hhh,WM_SETFONT,GGF(),0)
  End If
  Dim As hImageList IList = ImageList_Create(SizeIcon,SizeIcon,ILC_COLOR32,1,1)
  SetProp(hhh,"addparam60000",IList)
  SendMessage(hhh, LVM_SETIMAGELIST, StyleIcon  ,Cast(LPARAM, IList))
  If StyleListView<>0 Then
    SendMessage(hhh,LVM_SETEXTENDEDLISTVIEWSTYLE,0 ,Cast(LPARAM,StyleListView))
  EndIf
  Return hhh
End Function
