Any help is greatly appreciated!

Code: Select all
#ItemCount = 350000
#LVSICF_NOINVALIDATEALL = 1
#LVN_ODCACHEHINT = #LVN_FIRST - 13
Global Dim Item.s(#ItemCount)
Enumeration
  #window_0
  #ListIcon_0
EndEnumeration
Procedure WinCallback(hwnd, msg, wParam, lParam)
  result = #PB_ProcessPureBasicEvents
  Select msg
    Case #WM_NOTIFY
      *nmh.NMHDR = lParam
      Select *nmh\code
        Case #LVN_ODCACHEHINT
          result = 0
        Case #LVN_GETDISPINFO
          *nmlvd.NMLVDISPINFO = lParam
          If *nmlvd\item\mask & #LVIF_TEXT
            *nmlvd\item\pszText = @Item(*nmlvd\item\iItem)
          EndIf
      EndSelect
  EndSelect
  ProcedureReturn result
EndProcedure
OpenWindow(#Window_0, 380, 150, 771, 336, "Putting strings in and out of a ListIcon Gadget", #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_TitleBar|#PB_Window_ScreenCentered)
SetWindowCallback(@WinCallback())
ListIconGadget(#ListIcon_0, 10, 10, 750, 250, "", 725, #LVS_OWNERDATA)
SendMessage_(GadgetID(#ListIcon_0), #LVM_SETITEMCOUNT, #ItemCount, #LVSICF_NOINVALIDATEALL)
For i=0 To #ItemCount-1
  Item(i) = Str(i) + " PureBasic PureBasic PureBasic PureBasic PureBasic PureBasic PureBasic PureBasic PureBasic PureBasic PureBasic PureBasic PureBasic" + #CRLF$
Next
Repeat
  event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
Thank you in advance!






 )
 )

 
  