As you mentioned, you can use a tree control to do this. You can also configure the tree control to look like a list control, and you can even use the list API (InsertListItem, etc).
To make the tree look like a list control, simply set a few attributes. For example, you could configure the tree like this and then pretend you have a listbox with multiple selection capability...
SetCtrlAttribute(panel, ctrl, ATTR_SHOW_CONNECTION_LINES, 0);
SetCtrlAttribute(panel, ctrl, ATTR_SHOW_PLUS_MINUS, 0);
SetCtrlAttribute(panel, ctrl, ATTR_FULL_ROW_SELECT, 1);
SetCtrlAttribute(panel, ctrl, ATTR_ENABLE_DRAG_DROP, 0);
SetTreeItemAttribute(panel, ctrl, VAL_DFLT_FOR_NEW_OBJECTS, ATTR_NO_EDIT_LABEL, 1);
SetCtrlAttribute(panel, ctrl, ATTR_ENABLE_POPUP_MENU, 0);
To use check marks, you have to enable the show marks attribute...
SetCtrlAttribute(panel, ctrl, ATTR_SHOW_MARKS, 1);
Tree items by default have their ATTR_MARK_TYPE set to VAL_MARK_CHECK, which is probably what you want. Each item will have a check box next to it instead of the check column that the listbox has, but it behaves the same way. You could also enable ATTR_DRAGGABLE_MARKS if you want to be able to change check mark status by dragging with the mouse.
- jared