PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Elias Montoya on November 22, 2007, 06:39:24 PM

Title: Crash with listview
Post by: Elias Montoya on November 22, 2007, 06:39:24 PM
 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.
Title: Re: Crash with listview
Post by: Elias Montoya on November 22, 2007, 06:52:34 PM
 And cant seem to find a workaround. Here is the crashing code.

[attachment deleted by admin]
Title: Re: Crash with listview
Post by: Rudolf Fürstauer on November 23, 2007, 04:47:42 AM
Hi Elias,

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


Fürstauer Rudolf
Title: Re: Crash with listview
Post by: Elias Montoya on November 23, 2007, 03:28:58 PM

Thanx Rudolf, it worked. :)