Question and Answer Database FAQ989C.txt Listbox Sort: LB_SORT Category :OWL Platform :All Product :BC++ 5.x Question: I want to put a listbox into my client window directly. I make my new class derived from TListBox (Twindow*,int,int,int,int,int,TModule) and set the Attr.Style as LBS_NOTIFY, Because I don't want the listbox is sort type ,However, It always function sort, how can I do this? I don't use it in Dialog,so I could not use TListBox(parent, Resource Id). Answer: assume you set the LBS_NOTIFY attribute in Attr.Style vith an OR operator (Attr.Style |= LBS_NOTIFY). Since the TListBox constructor contains "Attr.Style |= LBS_NORMAL", and since LBS_NORMAL = LBS_SORT | other flags, your listbox is automatically sorted. If you want to avoid this, you have to remove the LBS_SORT attribute with Attr.Style &= ~LBS_SORT. 7/2/98 10:32:32 AM
Last Modified: 01-SEP-99