|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| -
| Header File
| commctrl.h
| Unicode
| No
| Platform Notes
| None
|
|
|
LVM_SORTITEMS
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;
Parameters
lParamSort
Application-defined value that is passed to the comparison function.
pfnCompare
Pointer to the application-defined comparison function. The comparison
function is called during the sort operation each time the relative order of two list
items needs to be compared.
Return Values
Returns TRUE if successful or FALSE otherwise.
Remarks
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.
See Also
ListView_SortItems, LV_ITEM
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|