Is there a way to modify a window's style (CWnd base type) after it has been created? Here's what I've been doing, and it doesn't seem to do anything. I'm using MFC to create my windows.
Now when I run this, result gets the value of 1, which according to the help files means it successfully modified the style. Yet when I go to click on stuff in the list box, I can't select more than one item. If I set the LBS_EXTENDEDSEL flag when using the resource editor, it lets me select more than one item in the box, but using this way it doesn't.Code:// Assume myBox is a CListBox, already created int result; result = myBox.ModifyStyle(0, LBS_EXTENDEDSEL, 0);
Depending on what I'm sticking in myBox, then I may or may not want the user to be able to select more than 1 item. Any way to do this, other than making 2 list box's and hiding one?



LinkBack URL
About LinkBacks


