CompuServe Messages

#OwnerDraw Listbox Sort

    09-Jul-94 20:00:59
Sb: #30155-#OwnerDraw Listbox Sort
Fm: Charles Steinhardt 70353,2604
To: Kevin Maisano 72204,1011
Well Kevin, The CD workd great!! (Now I'm awaiting a new front bezel as NEC needs you to request a different bezel for Compaq & IBM Machines!!! Anyhow, while I can't find any direct support for your threory – I've certainly found implied support for your supposition regarding LBS_HASSTRINGS: MSJ – Volume 5 – Number 4 (July, 1990) The LBS_SORT style gets a little tricky with owner draw list boxes. If LBS_HASSTRINGS is set, it's just as easy as before-Windows will take care of the sorting on its own. But without LBS_HASSTRINGS, there's no way for Windows to determine the sort order. So when you send an LB_ADDSTRING message to insert an entry, Windows sends back one or more WM_COMPAREITEM messages to the list box's owner. Like the compare routine called back by the C run-time library's qsort function, this message lets you specify the sort ordering by comparing pairs of items. Will your ListBox work without this style? Charles Steinhardt[MVP], OMG Inc. Written 09-Jul-1994 @ 20:58:05 Windows NavCIS PRO 1.21 !^NavFont01F000EMGHHGF5MIE0HJK823A