HOWTO: Create a List Box That Does Not Sort

ID: Q68116


The information in this article applies to:


SUMMARY

A Windows list box with the LBS_STANDARD style will sort the list of items into alphabetical order before displaying them in the control.

To create a list box that will not sort, you must remove the LBS_SORT bit from the window style. The following style specification removes this bit:

(LBS_STANDARD | LBS_HASSTRINGS) & ~LBS_SORT


Keywords          : kbCtrl kbListBox kbGrpUser 
Version           : 
Platform          : 
Issue type        : kbhowto 

Last Reviewed: March 6, 1999