
Listbox: Sometimes allowing multiple selection and sometimes not ?
I have a dialog box with a listbox where I sometimes want to allow
multiple (or extended) selection and sometimes not. Is this possible without
doing something messy like creating two almost identical dialog boxes (one
with a listbox allowing multiple/extended selection and one with a listbox not
allowing it) or having two listboxes on top of each other and showing/hiding
them one at a time, depending on whether I'm allowing multiple selection ?
I tried deriving a class from CListBox, adding it as a member to my dialog
class and then messing with the derived class' PreCreateWindow and Create
functions but that doesn't work, the derived functions do not even get called
(the result I suspected).
Bjorn