Jump to content
Sign in to follow this  

Guictrlregisterlistviewsort Based Sorting

Recommended Posts


LV Sorting with GUICtrlRegisterListViewSort works excellent and is really fast compared to the UDF based sorting.

Thanks for this nice routine :think: .

The sorting with respect to a particular column happens whenever one clicks the appropriate LV header.

My question:

Is it possible to trigger the sorting without clicking on the LV header?

E.g. when the LV is filled with data I would like to have it sorted as if I had pressed the appropriate column.

I am aware of the LVM_SORTITEMS message but it needs the callback sort-routine as argument.

Sending a mouse click on the appropriate header item could work but is there any otherway to trigger sorting?


Edited by aec

Share this post

Link to post
Share on other sites

I've been scouring the Internet for a way to do this, but have come to the same exact conclusions as you have -- that either a way to use LVM_SORTITEMS, or a way to simulate mouse clicks on a column header is necessary. What's worse is the fact that I'm working on a listview that doesn't display the column headers in the first place, so this quickly becomes an even more difficult job without the help of LVM_SORTITEMS =T

I'd love to use GUICtrlRegisterListViewSort, but unfortunately, I can't because I can't simulate a column click. Any ideas?

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