#Include once "window9.bi"

Function SetColumnWidthListView(ByVal gadget As integer,ByVal IndexColumn As Integer,ByVal Width_ As Integer,ByVal flag As Integer=-1) As Integer Export
	Dim szClass As ZString *256
	GetClassName(GadgetID(gadget),@szClass,256)
	If szClass = "ExplorerGadget" Then
		return SendMessage(GetProp(GadgetID(gadget),"EXPLORERGADGETLISTVIEWWINDOW"),4096+30,IndexColumn,MAKELPARAM(Width_,flag ))
	Else
		return SendMessage(GadgetID(gadget),4096+30,IndexColumn,MAKELPARAM(Width_,flag ))
	EndIf
End Function
