I test multiple methods of sorting (I did select custom sort and added this to the OnSortCompare event:
CompareStringW and CompareStringEx took too long that I had to terminate it.
case cmbSortType.ItemIndex of
0: Result := StrCmpLogicalW(PWideChar(Filename1),PWideChar(Filename2));
1: Result := CompareStringW(LOCALE_CUSTOM_DEFAULT, LINGUISTIC_IGNOREDIACRITIC,
PWideChar(Filename1), length(PWideChar(Filename1)), PWideChar(Filename2), length(PWideChar(Filename2)));
2: Result := CompareStringEx(LOCALE_NAME_INVARIANT, 0, PWideChar(Filename1), -1, PWideChar(Filename2), -1, nil, nil, 0);
3: Result := CompareStringOrdinal(PWideChar(Filename1), length(PWideChar(Filename2)), PWideChar(Filename2), length(PWideChar(Filename2)), true);
end;
Is this the correct way of implementing these methods?
-----------------
3 Monitors
Windows 10
Delphi 6,2007 and 10.2
ImageEn v.8.7