Microsoft KB Archive/68116

{|
 * width="100%"|

HOWTO: Create a List Box That Does Not Sort

 * }

Q68116

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK)
 * Microsoft Win32 Application Programming Interface (API)

-

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_HASSTRINGS) & ~LBS_SORT" Additional query words:

Keywords : kbCtrl kbListBox kbOSWin2000 kbGrpDSUser kbOSWin

Issue type : kbhowto

Technology : kbAudDeveloper kbSDKSearch kbWin32sSearch kbWin32API kbWinSDKSearch