HOWTO: Create a List Box That Does Not Sort

ID: Q68116


The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK)
  • Microsoft Win32 Application Programming Interface (API)
  • Microsoft Windows 2000


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

Additional query words:

Keywords : kbCtrl kbListBox kbGrpUser
Version : WINDOWS:; winnt:
Platform : WINDOWS winnt
Issue type : kbhowto


Last Reviewed: January 28, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.