#include once "window9.bi"

Sub SetColumnWidthListView(ByVal gadget As Long, ByVal IndexColumn As Long, ByVal Width_ As Long,ByVal flag As Long) Export
	dim as USTRING szClass = GetClassName_(GadgetID(gadget))
	If szClass = "ExplorerGadget" Then
		SendMessage(GetProp(GadgetID(gadget),"EXPLORERGADGETLISTVIEWWINDOW"),4096+30,CInt(IndexColumn),MAKELPARAM(CInt(Width_),CInt(flag) ))
	Else
		SendMessage(GadgetID(gadget),4096+30,CInt(IndexColumn),MAKELPARAM(CInt(Width_),CInt(flag) ))
	EndIf
End Sub
