GetItemCount in a Listbox

Share your advanced PureBasic knowledge/code with the community.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

GetItemCount in a Listbox

Post by BackupUser »

Code updated For 5.20+ (same As CountGadgetItems())

Restored from previous forum. Originally posted by Rings.

Try this code to get The Count of a listbox or to search in a listbox for a string.I'v also tried to change the Style of a control (Stringgadget to Multiline) but failed.Any hints ?

Code: Select all

Procedure GetCount(myhwnd)
  Result=SendMessage_(myhwnd, #LB_GETCOUNT,0,0)
  ProcedureReturn Result
EndProcedure

hwnd=OpenWindow(0, 100, 100, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
If hwnd
  ButtonGadget(1,1,10,80,25,"EXIT")
  ButtonGadget(2,1,40,100,25,"Search")
  SThWnd=StringGadget(3,20,70,80,45,"54: Entry")
  Result=GetWindowLong_(SThWnd, #GWL_EXSTYLE)
  SetWindowLong_(SThWnd, #GWL_EXSTYLE, Result|#ES_MULTILINE|#ES_RIGHT )
  ; Result=SendMessage_(SThWnd, #WM_CREATE, 0,0)
  
  LVhWnd=ListViewGadget(4, 0, 130, 80, 100)
  SetWindowLong_(LVhWnd, #GWL_EXSTYLE, GetWindowLong_(LVhWnd, #GWL_EXSTYLE) |#LBS_SORT|#LBS_MULTIPLESEL )
  ;Result=SendMessage_(LVhWnd, #WM_CREATE, 0,0)
  
  For I= 1 To 100
    AddGadgetItem(4,-1, Str(100-I) + ": Entry")
  Next
  Repeat
    EventID.l = WaitWindowEvent()
    If EventID = #PB_Event_CloseWindow ; If the user has pressed on the close button
      Quit = 1
    EndIf
    If EventID=#PB_Event_Gadget ;#PB_EventGadget
      GadNR.l=EventGadget()
      If GadNR.l=1
        Quit=1
      EndIf
      If GadNR.l=2
        Search$=GetGadgetText(3)
        Result=SendMessage_(LVhWnd, #LB_FINDSTRINGEXACT, -1,Search$)
        If Result>-1
          SetGadgetState(4,Result)
        EndIf
        MessageRequester("Info",Str(GetCount(LVhWnd)),0)
      EndIf
    EndIf
  Until Quit = 1
EndIf
End 
Getting better with a little help from my friends....thx Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

ListStart = 1 ; I think standard list starts at 1??
SetGadgetState(#Gadget, ListStart) ; Set gadget to first element if any exists

While GetGadetState(#Gadget) -1 ; If -1, nothing selected or no more items
Temporary$ = GetGadgetText(#Gadget) ; grab the actual item if you want it
ListStart + 1 ; Increment the counter and test for the next item if any
SetGadgetState(#Gadget, ListStart) ; select first item to count from if any
wend
but my listing is a bit shorter(Non linux)
Result=SendMessage_(myhwnd, #LB_GETCOUNT,0,0)

Getting better with a little help from my friends....thx Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

That's cool, was just trying to help. Do you think your solution would work with a ListIconGadget window too?? I need some way of counting the items int here too, gettting an item out of each line, double and single click events. basically, everything that works with a normal ListViewGadget


Fangles
ListIconGadget ? give it a try.

Getting better with a little help from my friends....thx Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.

Oh Fangles,
You can use SendMessage_ , PostMessage_ and a few others to take control over the Listview(ListiconGadget).
I search the net and found following Constants(Converted from VB):

#LVM_FIRST &H1000
ListView Styles (LVS_)
#LVS_ICON = &H0
#LVS_REPORT = &H1
#LVS_SMALLICON = &H2
#LVS_LIST = &H3
#LVS_TYPEMASK = &H3
#LVS_SINGLESEL = &H4
#LVS_SHOWSELALWAYS = &H8
#LVS_SORTASCENDING = &H10
#LVS_SORTDESCENDING = &H20
#LVS_SHAREIMAGELISTS = &H40
#LVS_NOLABELWRAP = &H80
#LVS_AUTOARRANGE = &H100
#LVS_EDITLABELS = &H200
#LVS_OWNERDATA = &H1000 ;IE 3+ only
#LVS_NOSCROLL = &H2000

#LVS_TYPESTYLEMASK = &HFC00

#LVS_ALIGNTOP = &H0
#LVS_ALIGNLEFT = &H800
#LVS_ALIGNMASK = &HC00

#LVS_OWNERDRAWFIXED = &H400
#LVS_NOCOLUMNHEADER = &H4000
#LVS_NOSORTHEADER = &H8000&

ListView Messages (LVM_) (Generic)
#LVM_GETBKCOLOR = (LVM_FIRST + 0)
#LVM_SETBKCOLOR = (LVM_FIRST + 1)
#LVM_GETIMAGELIST = (LVM_FIRST + 2)
#LVM_SETIMAGELIST = (LVM_FIRST + 3)
#LVM_GETITEMCOUNT = (LVM_FIRST + 4)

#LVM_DELETEITEM = (LVM_FIRST + 8)
#LVM_DELETEALLITEMS = (LVM_FIRST + 9)
#LVM_GETCALLBACKMASK = (LVM_FIRST + 10)
#LVM_SETCALLBACKMASK = (LVM_FIRST + 11)
#LVM_GETNEXTITEM = (LVM_FIRST + 12)

#LVM_SETITEMPOSITION = (LVM_FIRST + 15)
#LVM_GETITEMPOSITION = (LVM_FIRST + 16)

#LVM_HITTEST = (LVM_FIRST + 18)
#LVM_ENSUREVISIBLE = (LVM_FIRST + 19)
#LVM_SCROLL = (LVM_FIRST + 20)
#LVM_REDRAWITEMS = (LVM_FIRST + 21)
#LVM_ARRANGE = (LVM_FIRST + 22)

#LVM_GETEDITCONTROL = (LVM_FIRST + 24)

#LVM_DELETECOLUMN = (LVM_FIRST + 28)
#LVM_GETCOLUMNWIDTH = (LVM_FIRST + 29)
#LVM_SETCOLUMNWIDTH = (LVM_FIRST + 30)

#LVM_GETHEADER = (LVM_FIRST + 31) ;IE 3+ only

#LVM_CREATEDRAGIMAGE = (LVM_FIRST + 33)
#LVM_GETVIEWRECT = (LVM_FIRST + 34)
#LVM_GETTEXTCOLOR = (LVM_FIRST + 35)
#LVM_SETTEXTCOLOR = (LVM_FIRST + 36)
#LVM_GETTEXTBKCOLOR = (LVM_FIRST + 37)
#LVM_SETTEXTBKCOLOR = (LVM_FIRST + 38)
#LVM_GETTOPINDEX = (LVM_FIRST + 39)
#LVM_GETCOUNTPERPAGE = (LVM_FIRST + 40)
#LVM_GETORIGIN = (LVM_FIRST + 41)
#LVM_UPDATE = (LVM_FIRST + 42)
#LVM_SETITEMSTATE = (LVM_FIRST + 43)
#LVM_GETITEMSTATE = (LVM_FIRST + 44)
#LVM_SETITEMCOUNT = (LVM_FIRST + 47)
#LVM_SORTITEMS = (LVM_FIRST + 48)
#LVM_SETITEMPOSITION32 = (LVM_FIRST + 49)
#LVM_GETSELECTEDCOUNT = (LVM_FIRST + 50)
#LVM_GETITEMSPACING = (LVM_FIRST + 51)

#LVM_SETICONSPACING = (LVM_FIRST + 53) ;IE 3+ only

#LVM_GETSUBITEMRECT = (LVM_FIRST + 56)
#LVM_SUBITEMHITTEST = (LVM_FIRST + 57)
#LVM_SETCOLUMNORDERARRAY = (LVM_FIRST + 58)
#LVM_GETCOLUMNORDERARRAY = (LVM_FIRST + 59)
#LVM_SETHOTITEM = (LVM_FIRST + 60)
#LVM_GETHOTITEM = (LVM_FIRST + 61)
#LVM_SETHOTCURSOR = (LVM_FIRST + 62)
#LVM_GETHOTCURSOR = (LVM_FIRST + 63)
#LVM_APPROXIMATEVIEWRECT = (LVM_FIRST + 64)
#LVM_SETWORKAREA = (LVM_FIRST + 65)

#LVM_GETSELECTIONMARK = (LVM_FIRST + 66) ;Win32 and IE 4 only
#LVM_SETSELECTIONMARK = (LVM_FIRST + 67) ;Win32 and IE 4 only
#LVM_GETWORKAREA = (LVM_FIRST + 70) ;Win32 and IE 4 only
#LVM_SETHOVERTIME = (LVM_FIRST + 71) ;Win32 and IE 4 only
#LVM_GETHOVERTIME = (LVM_FIRST + 72) ;Win32 and IE 4 only

ListView Messages (LVM_) (Win95)
#LVM_GETITEM = (LVM_FIRST + 5)
#LVM_SETITEM = (LVM_FIRST + 6)

#LVM_INSERTITEMA = (LVM_FIRST + 7)
#LVM_INSERTITEM = LVM_INSERTITEMA

#LVM_FINDITEMA = (LVM_FIRST + 13)
#LVM_FINDITEM = LVM_FINDITEMA

#LVM_GETSTRINGWIDTHA = (LVM_FIRST + 17)
#LVM_GETSTRINGWIDTH = LVM_GETSTRINGWIDTHA

#LVM_EDITLABELA = (LVM_FIRST + 23)
#LVM_EDITLABEL = LVM_EDITLABELA

#LVM_GETCOLUMNA = (LVM_FIRST + 25)
#LVM_GETCOLUMN = LVM_GETCOLUMNA

#LVM_SETCOLUMNA = (LVM_FIRST + 26)
#LVM_SETCOLUMN = LVM_SETCOLUMNA

#LVM_INSERTCOLUMNA = (LVM_FIRST + 27)
#LVM_INSERTCOLUMN = LVM_INSERTCOLUMNA

#LVM_GETITEMTEXTA = (LVM_FIRST + 45)
#LVM_GETITEMTEXT = LVM_GETITEMTEXTA

#LVM_SETITEMTEXTA = (LVM_FIRST + 46)
#LVM_SETITEMTEXT = LVM_SETITEMTEXTA

#LVM_GETISEARCHSTRINGA = (LVM_FIRST + 52)
#LVM_GETISEARCHSTRING = LVM_GETISEARCHSTRINGA

#LVM_SETBKIMAGEA = (LVM_FIRST + 68) ;Win32 and IE 4 only
#LVM_GETBKIMAGEA = (LVM_FIRST + 69) ;Win32 and IE 4 only
#LVBKIMAGE = LVBKIMAGEA ;Win32 and IE 4 only
#LPLVBKIMAGE = LPLVBKIMAGEA ;Win32 and IE 4 only
#LVM_SETBKIMAGE = LVM_SETBKIMAGEA ;Win32 and IE 4 only
#LVM_GETBKIMAGE = LVM_GETBKIMAGEA ;Win32 and IE 4 only

ListView Messages (LVM_) (Unicode)
#LVM_GETITEM = (LVM_FIRST + 75)
#LVM_SETITEM = (LVM_FIRST + 76)

#LVM_INSERTITEMW = (LVM_FIRST + 77)
#LVM_INSERTITEM = LVM_INSERTITEMW

#LVM_FINDITEMW = (LVM_FIRST + 83)
#LVM_FINDITEM = LVM_FINDITEMW

#LVM_GETSTRINGWIDTHW = (LVM_FIRST + 87)
#LVM_GETSTRINGWIDTH = LVM_GETSTRINGWIDTHW

#LVM_EDITLABELW = (LVM_FIRST + 118)
#LVM_EDITLABEL = LVM_EDITLABELW

#LVM_GETCOLUMNW = (LVM_FIRST + 95)
#LVM_GETCOLUMN = LVM_GETCOLUMNW

#LVM_SETCOLUMNW = (LVM_FIRST + 96)
#LVM_SETCOLUMN = LVM_SETCOLUMNW

#LVM_INSERTCOLUMNW = (LVM_FIRST + 97)
#LVM_INSERTCOLUMN = LVM_INSERTCOLUMNW

#LVM_GETITEMTEXTW = (LVM_FIRST + 115)
#LVM_GETITEMTEXT = LVM_GETITEMTEXTW

#LVM_SETITEMTEXTW = (LVM_FIRST + 116)
#LVM_SETITEMTEXT = LVM_SETITEMTEXTW

#LVM_GETISEARCHSTRINGW = (LVM_FIRST + 117)
#LVM_GETISEARCHSTRING = LVM_GETISEARCHSTRINGW

#LVM_GETBKIMAGEW = (LVM_FIRST + 139) ;Win32 and IE 4 only
#LVM_SETBKIMAGEW = (LVM_FIRST + 138) ;Win32 and IE 4 only
#LVBKIMAGE = LVBKIMAGEW ;Win32 and IE 4 only
#LPLVBKIMAGE = LPLVBKIMAGEW ;Win32 and IE 4 only
#LVM_SETBKIMAGE = LVM_SETBKIMAGEW ;Win32 and IE 4 only
#LVM_GETBKIMAGE = LVM_GETBKIMAGEW ;Win32 and IE 4 only

ListView Extended Style Messages (LVS_EX_) (Win95)
#LVS_EX_GRIDLINES = &H1
#LVS_EX_SUBITEMIMAGES = &H2
#LVS_EX_CHECKBOXES = &H4
#LVS_EX_TRACKSELECT = &H8
#LVS_EX_HEADERDRAGDROP = &H10
#LVS_EX_FULLROWSELECT = &H20 ;applies to report mode only
#LVS_EX_ONECLICKACTIVATE = &H40
#LVS_EX_TWOCLICKACTIVATE = &H80
#LVS_EX_FLATSB = &H100 ;cannot be cleared - Win32 & IE4 only
#LVS_EX_REGIONAL = &H200 ;Win32 & IE4 only
#LVS_EX_INFOTIP = &H400 ;listview does InfoTips for you -
Win32 & IE4 only

ListView Set Image List Messages (LVSIL_)
#LVSIL_NORMAL = 0
#LVSIL_SMALL = 1
#LVSIL_STATE = 2

ListView Item Format Messages (LVIF_)
#LVIF_TEXT = &H1
#LVIF_IMAGE = &H2
#LVIF_PARAM = &H4
#LVIF_STATE = &H8
#LVIF_INDENT = &H10 ;IE 3+ only
#LVIF_NORECOMPUTE = &H800 ;IE 3+ only
#LVIF_DI_SETITEM = &H1000

ListView Item State Messages (LVIS_)
#LVIS_FOCUSED = &H1
#LVIS_SELECTED = &H2
#LVIS_CUT = &H4
#LVIS_DROPHILITED = &H8

#LVIS_OVERLAYMASK = &HF00
#LVIS_STATEIMAGEMASK = &HF000

ListView Item Definitions (LV_ITEM) (Win95)
#LV_ITEM = LV_ITEMA
#LPLV_ITEM = LPLV_ITEMA
#LV_ITEMA = LV_ITEMA ;IE 3+ only
#tagLV_ITEMA = LV_ITEMA
ListView Item Definitions (LV_ITEM) (Unicode)
#LV_ITEM = LV_ITEMW
#LPLV_ITEM = LPLV_ITEMW ;Unicode (NT)
#LV_ITEM = LV_ITEM ;IE 3+ only
#tagLV_ITEMW = LV_ITEMW

ListView - Misc. Messages
;#INDEXTOSTATEIMAGEMASK(i) ((i) << 12)
#I_INDENTCALLBACK = (-1) ;IE 3+ only
#LPSTR_TEXTCALLBACKW = ((LPWSTR) - 1&) ;Unicode (NT)
#LPSTR_TEXTCALLBACKA = ((LPSTR) - 1&) ;win95

#LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKW ;Unicode (NT)
#LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKA ;win95

ListView Notification Item Messages (LVNI_)
#LVNI_ALL = &H0
#LVNI_FOCUSED = &H1
#LVNI_SELECTED = &H2
#LVNI_CUT = &H4
#LVNI_DROPHILITED = &H8

#LVNI_ABOVE = &H100
#LVNI_BELOW = &H200
#LVNI_TOLEFT = &H400
#LVNI_TORIGHT = &H800

ListView Find Item Messages (LVFI_) (Generic)
#LVFI_PARAM = &H1
#LVFI_STRING = &H2
#LVFI_PARTIAL = &H8
#LVFI_WRAP = &H20
#LVFI_NEARESTXY = &H40

#LV_FINDINFO = LVFINDINFO

ListView Find Item Messages (LVFI_) (Win95)
#LV_FINDINFOA = LVFINDINFOA
#LV_FINDINFOA = LVFINDINFOA ;IE 3+ only
#tagLVFINDINFOA = LV_FINDINFOA
#LVFINDINFOA = LV_FINDINFOA
#LVFINDINFO = LVFINDINFOA

ListView Find Item Messages (LVFI_) (Unicode)
#LV_FINDINFOW = LVFINDINFOW
#LV_FINDINFOW = LVFINDINFOW ;IE 3+ only
#tagLVFINDINFOW = LV_FINDINFOW
#LVFINDINFOW = LV_FINDINFOW
#LVFINDINFO = LVFINDINFOW

ListView Find ItemRect Messages (LVIR_)
#LVIR_BOUNDS = 0
#LVIR_ICON = 1
#LVIR_LABEL = 2
#LVIR_SELECTBOUNDS = 3

ListView Hit Test Messages (LVHT_)
#LVHT_NOWHERE = &H1
#LVHT_ONITEMICON = &H2
#LVHT_ONITEMLABEL = &H4
#LVHT_ONITEMSTATEICON = &H8
#LVHT_ONITEM = (LVHT_ONITEMICON Or _
LVHT_ONITEMLABEL Or _
LVHT_ONITEMSTATEICON)

#LVHT_ABOVE = &H8
#LVHT_BELOW = &H10
#LVHT_TORIGHT = &H20
#LVHT_TOLEFT = &H40

#LV_HITTESTINFO = LVHITTESTINFO ;IE 3+ only
#tagLVHITTESTINFO = LV_HITTESTINFO
#LVHITTESTINFO = LV_HITTESTINFO

ListView Arrange Messages (LVA_)
#LVA_DEFAULT = &H0
#LVA_ALIGNLEFT = &H1
#LVA_ALIGNTOP = &H2
#LVA_SNAPTOGRID = &H5

ListView Column Messages (LVC_) (Generic)
#LV_COLUMN = LVCOLUMN ;IE 3+ only

ListView Column Messages (LVC_) (Win95)
#LV_COLUMNA = LVCOLUMNA ;IE 3+ only
#tagLVCOLUMNA = _LV_COLUMNA
#LVCOLUMNA = LV_COLUMNA
#LVCOLUMN = LVCOLUMNA
#LPLVCOLUMN = LPLVCOLUMNA

ListView Column Messages (LVC_) (Unicode)
#LV_COLUMNW = LVCOLUMNW ;IE 3+ only
#tagLVCOLUMNW = _LV_COLUMNW
#LVCOLUMNW = LV_COLUMNW
#LVCOLUMN = LVCOLUMNW
#LPLVCOLUMN = LPLVCOLUMNW

ListView Column Flag Messages (LVCF_) (LVC.mask)
#LVCF_FMT = &H1
#LVCF_WIDTH = &H2
#LVCF_TEXT = &H4
#LVCF_SUBITEM = &H8
#LVCF_IMAGE = &H10 ;IE 3+ only
#LVCF_ORDER = &H20 ;IE 3+ only

ListView Column Format Messages (LVCFMT_) (LVC.fmt)
#LVCFMT_LEFT = &H0
#LVCFMT_RIGHT = &H1
#LVCFMT_CENTER = &H2
#LVCFMT_JUSTIFYMASK = &H3
#LVCFMT_IMAGE = &H800 ;IE 3+ only
#LVCFMT_BITMAP_ON_RIGHT = &H1000 ;IE 3+ only
#LVCFMT_COL_HAS_IMAGES = &H8000& ;IE 4 only

ListView Set Column Width Messages (LVSCW_)
#LVSCW_AUTOSIZE = -1
#LVSCW_AUTOSIZE_USEHEADER = -2

ListView Background Image Flags (LVBKIF_)
#LVBKIF_SOURCE_NONE = &H0 ;Win32 and IE 4 only
#LVBKIF_SOURCE_HBITMAP = &H1 ;Win32 and IE 4 only
#LVBKIF_SOURCE_URL = &H2 ;Win32 and IE 4 only
#LVBKIF_SOURCE_MASK = &H3 ;Win32 and IE 4 only
#LVBKIF_STYLE_NORMAL = &H0 ;Win32 and IE 4 only
#LVBKIF_STYLE_TILE = &H10 ;Win32 and IE 4 only
#LVBKIF_STYLE_MASK = &H10 ;Win32 and IE 4 only

ListView Notification Messages (LVN_) (Generic)
#LVN_ITEMCHANGING = (LVN_FIRST - 0)
#LVN_ITEMCHANGED = (LVN_FIRST - 1)
#LVN_INSERTITEM = (LVN_FIRST - 2)
#LVN_DELETEITEM = (LVN_FIRST - 3)
#LVN_DELETEALLITEMS = (LVN_FIRST - 4)

#LVN_COLUMNCLICK = (LVN_FIRST - 8)
#LVN_BEGINDRAG = (LVN_FIRST - 9)
#LVN_BEGINRDRAG = (LVN_FIRST - 11)

#LVN_ODCACHEHINT = (LVN_FIRST - 13) ;IE 3+ only
#LVN_ITEMACTIVATE = (LVN_FIRST - 14)
#LVN_ODSTATECHANGED = (LVN_FIRST - 15)

#LVN_HOTTRACK = (LVN_FIRST - 21)

#LVN_KEYDOWN = (LVN_FIRST - 55)
#LVN_MARQUEEBEGIN = (LVN_FIRST - 56) ;IE 3+ only

ListView Notification Messages (LVN_) (Win95)
#LVN_BEGINLABELEDITA = (LVN_FIRST - 5)
#LVN_ENDLABELEDITA = (LVN_FIRST - 6)

#LVN_GETDISPINFOA = (LVN_FIRST - 50)
#LVN_SETDISPINFOA = (LVN_FIRST - 51)
#LVN_ODFINDITEMA = (LVN_FIRST - 52) ;IE 3+ only
#LVN_ODFINDITEM = LVN_ODFINDITEMA

#LVN_BEGINLABELEDIT = LVN_BEGINLABELEDITA
#LVN_ENDLABELEDIT = LVN_ENDLABELEDITA
#LVN_GETDISPINFO = LVN_GETDISPINFOA
#LVN_SETDISPINFO = LVN_SETDISPINFOA

#LV_DISPINFOA = NMLVDISPINFOA ;IE 3+ only
#tagLVDISPINFO = _LV_DISPINFO
#NMLVDISPINFOA = LV_DISPINFOA
#NMLVDISPINFO = NMLVDISPINFOA

ListView Notification Messages (LVN_) (Unicode)
#LVN_BEGINLABELEDITW = (LVN_FIRST - 75)
#LVN_ENDLABELEDITW = (LVN_FIRST - 76)

#LVN_GETDISPINFOW = (LVN_FIRST - 77)
#LVN_SETDISPINFOW = (LVN_FIRST - 78)
#LVN_ODFINDITEMW = (LVN_FIRST - 79) ;IE 3+ only
#LVN_ODFINDITEM = LVN_ODFINDITEMW

#LVN_BEGINLABELEDIT = LVN_BEGINLABELEDITW
#LVN_ENDLABELEDIT = LVN_ENDLABELEDITW
#LVN_GETDISPINFO = LVN_GETDISPINFOW
#LVN_SETDISPINFO = LVN_SETDISPINFOW

#LV_DISPINFOW = NMLVDISPINFOW ;IE 3+ only
#tagLVDISPINFOW = _LV_DISPINFOW
#NMLVDISPINFOW = LV_DISPINFOW
#NMLVDISPINFO = NMLVDISPINFOW



Getting better with a little help from my friends....thx Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.
Oh Fangles,
You can use SendMessage_ , PostMessage_ and a few others to take control over the Listview(ListiconGadget).
I search the net and found following Constants(Converted from VB):
Thanks Siggi, but finding the constants isn't the problem, I already found those and a lot more stuff. The problem is, and always has been that the syntactical makeup of Visual basic has always been of such a nauseating calibre that no-one except those who use it understand it!!

I Speak English, Australian, American, Hungarian and many dialects of BASIC (evil grin) and trying to understand VB gives me a huge headache. Now if VB adopted PureBasic's syntax, it would be easy!!!

Programmers are like aliens, they never speak the language of the planet they live on.

P.s.. My last point is that a lot of the constants require VB structures behind them, written in the same incomphrehensible gibberish that only a VB programmer can understand and I'm afraid that I am not one of them :):)

Fangles
Oh same old story.
I'm a pro VB-Programmer and struggle a lot with the 'NON-VB(Qbasic)-Like-Syntax' from PureBasic.I have to learn it.Most of my compile-syntax-error are
made by Comment a line.In VB its ' , in PureBasic(And NASM) its ; .
Btw. if you say you are familar with the Basic-dialects, you are can also understand some of the VB-Syntax.Okay, the calling of a DLL is totally others than in PureBasic.But Most Stuff is compatible.eg. A=A+1 is equal.
I often adopt Code from VB to Pure.
I can make a list of all those NONE-Compatible commands if you like.


Getting better with a little help from my friends....thx Siggi
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Manolo.


[/quote]
But Most Stuff is compatible.eg. A=A+1 is equal.

[/quote]

Hehe, is a minimal diferent...
a=1
a=a+1 Result = 2 (all basics)
-----
b=1
b+1 Result = 2 (PureBasic and others child litle lot basic's, an c (a++ is similiar)

I prefer PureBasic.
Regards
Manolo
[url]mailto:vpardo@infonegocio.com[/url]
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Rings.
I make lots of mistakes in it where information is missing from the manual or the order of things isn't obvious or my spelling mistakes hamstring me but it's a million times easier than VB
yep!

Getting better with a little help from my friends....thx Siggi
Post Reply