Penn,
Based on some Googling, I found various (albeit unofficial and dated) references that say you can't change that particular style after the control has been created.
One suggestion that is a bit ungraceful but would work is to create 2 stacked list boxes on the form. One with multiselect, one without. And then switch the visibility. For example (untested code):
BOOL dialogOnInit()
{
...
// Toggle visibility and assign proper listbox to class member
if (multi == true)
GetItem(IDC_LIST_BOX_SINGLE).Visible == false;
m_lbList = GetItem(IDC_LIST_BOX_MULTI);
m_lbList.Visible == true;
}
else
{
GetItem(IDC_LIST_BOX_MULTI).Visible == false;
m_lbList = GetItem(IDC_LIST_BOX_SINGLE);
m_lbList.Visible == true;
}
...
private:
ListBox m_lbList;