#include once "window9.bi"

Function AddListViewColumn(ByVal gadget As Integer, ByVal string_ As String,ByVal pos_ As Integer,ByVal SubItem_ As Integer,ByVal width_Column As Integer,ByVal Style_Column_TEXT As Integer=LVCFMT_CENTER,ByVal Style_Mask As Integer=LVCF_FMT Or LVCF_SUBITEM Or LVCF_TEXT Or LVCF_WIDTH) As Integer Export
  Dim As LVCOLUMN LVS9
  LVS9.mask=Style_Mask
  LVS9.fmt=Style_Column_TEXT
  LVS9.cx=width_Column
  LVS9.pszText =StrPtr(string_)
  LVS9.cchTextMax = Len(string_)
  LVS9.iSubItem = SubItem_
  return SendMessage(GadgetID(gadget),LVM_INSERTCOLUMN,pos_,Cast(LPARAM,@LVS9))  
End Function
