Is there a way to change a CListBox from single selection
to multiple selection, or back again, from inside the
program after the CListBox has been created?
Our application has several ListBoxes. I know its easy
to use the properties dialog control it set the control
to be single, or multiple, selection up front. But I'd
like a way to set this property from inside the program,
dynamically.
Thanks for any help.
Brent
David Lowndes - 31 Dec 2003 09:28 GMT
>Is there a way to change a CListBox from single selection
>to multiple selection, or back again, from inside the
>program after the CListBox has been created?
Brent,
You can change the style, but I think you'll find it doesn't take
effect. Many windows only set their behaviour when they're created,
and I think this is one of them.
The usual work-around is to have 2 controls and switch between them,
or to destroy and create a new control.
Dave

Signature
MVP VC++ FAQ: http://www.mvps.org/vcfaq