crystalburner Posted November 23, 2006 Share Posted November 23, 2006 A while ago Gary Frost very kindly helped me with some code examples to create sorting list guis. Then he sent some more code that added the ability to add colours to items in the list and sort them. It all works a treat and thank you Gary. I've been plagued by application crashes completely random sometimes not at all sometimes all the time no rhyme or reason to it. I have traced it to these lines GUICtrlSendMsg($invoicegui, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) GUICtrlSendMsg($invoicegui, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT) Gary, (or anyone else indeed) do you know why this would cause a crash. When i say crash i don't mean the interpreter stops i mean the whole exe falls over (this application has generated errors and needs to close) If you run the AU3 you get the same crash in autoit3.exe Hmmm! Link to comment Share on other sites More sharing options...
crystalburner Posted November 23, 2006 Author Share Posted November 23, 2006 plot thickens $invoicelist = GUICtrlCreateListView ("Invoice # |Date |Firstname |Surname |Company |Building |Address1 |Address2 |Postcode |Database ref#",0,0,600,350,$LVS_SORTDESCENDING) global $lvname=$invoicelist GUICtrlSendMsg($invoicegui, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) GUICtrlSendMsg($invoicegui, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT) this crashes 5/10 times it runs $invoicelist = GUICtrlCreateListView ("Invoice # |Date |Firstname |Surname |Company |Building |Address1 |Address2 |Postcode |Database ref#",0,0,600,350) global $lvname=$invoicelist GUICtrlSendMsg($invoicegui, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) GUICtrlSendMsg($invoicegui, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT) this is fine!! Link to comment Share on other sites More sharing options...
crystalburner Posted November 23, 2006 Author Share Posted November 23, 2006 this fixes it god knows why $invoicelist = GUICtrlCreateListView ("Invoice # |Date |Firstname |Surname |Company |Building |Address1 |Address2 |Postcode |Database ref#",0,0,600,350,$LVS_SORTDESCENDING,$LVS_EX_GRIDLINES) global $lvname=$invoicelist ;GUICtrlSendMsg($invoicegui, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES) ;GUICtrlSendMsg($invoicegui, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT) ;GUICtrlSendMsg($invoicegui, $LVS_SORTDESCENDING,-1,-1) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now