Sign in to follow this  
Followers 0
crystalburner

LVS_SORT GARTF

3 posts in this topic

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!

Share this post


Link to post
Share on other sites



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!!

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0