Crash with listview

Started by Elias Montoya, November 22, 2007, 06:39:24 PM

Previous topic - Next topic

Elias Montoya

 First time the item is highlighted correctly, the second item clicked... and the app crashes. Why?


'------------------------------------------------------------------------------------------------------------------------
Function FORM1_LISTVIEW1_LVN_ITEMCHANGED ( _
                                         ControlIndex  As Long,            _  ' index in Control Array
                                         hWndForm      As Dword,           _  ' handle of Form
                                         hWndControl   As Dword,           _  ' handle of Control
                                         ByVal lpNMV   As NM_LISTVIEW Ptr  _  ' pointer to NM_LISTVIEW
                                         ) As Long
                                         
Local TheRow As Long
theRow = @lpNMV.iItem
FF_ListView_SetSelectedItem (hWndControl, TheRow)

Function = %TRUE

End Function


If i remove the above code, and set the "FullRowSelect" to True, it still crashes after few clicks.

Elias Montoya

#1
 And cant seem to find a workaround. Here is the crashing code.

[attachment deleted by admin]

Rudolf Fürstauer

Hi Elias,

delete your listview and put a new listview an the form with the same name.
This should work.


Fürstauer Rudolf

Elias Montoya