In a dialog template I placed a ListBox, since checked list box is not shown in the visual layout options. I set it to owner-draw and set it up with DDX, changing the associated class variable from type CListBox to CCheckListBox - in other words the only changes I make from what the wizard does for me are set owner-draw, and chnage the member variable type.
in my dialog's OnInitDialog
method I then test with:
m_List.AddString(_T("One"));
m_List.AddString(_T("Two"));
m_List.AddString(_T("Three"));
m_List.AddString(_T("Four"));
m_List.SetCheck(1,1);
When I run the list is there, with 4 items and one checked, with the right strings. But, the item heights are wrong. It seems like the height of the checkbox is used to determine the item height, leading to the text overlapping the item below.
Shouldn't the default behavior of the class be to figure this out, without me having to individually set each item's height?