The LVM_SORTITEMS message uses an application-defined comparison function to sort the items of a list view control. The index of each item changes to reflect the new sequence. You can send this message explicitly or by using the ListView_SortItems macro.
LVM_SORTITEMS wParam = (WPARAM) (LPARAM) lParamSort; lParam = (LPARAM) (PFNLVCOMPARE) pfnCompare;
Returns TRUE if successful or FALSE otherwise.
The comparison function has the following form:
int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
The lParam1 parameter is the 32-bit value associated with the first item being compared; and the lParam2 parameter is the value associated with the second item. These are the values that were specified in the lParam member of the items’ LV_ITEM structure when they were inserted into the list. The lParamSort parameter is the same value passed to the LVM_SORTITEMS message.
The comparison function must return a negative value if the first item should precede the second, a positive value if the first item should follow the second, or zero if the two items are equivalent.
file: /Techref/os/win/api/win32/mess/src/msg13_8.htm, 2KB, , updated: 2008/3/17 22:27, local time: 2024/11/23 21:39,
3.133.107.11:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://ecomorder.com/techref/os/win/api/win32/mess/src/msg13_8.htm"> LVM_SORTITEMS</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to ecomorder.com! |
.