Multicolumn List Boxes
I have a multicolumn list box that I'd like to add columns to and different things to those columns. However, I can't find any info on how to do so, MSDN doesn't even say anything. Can anyone give me some info on how to use these? I found this code on a forum from a long time ago but I have no idea what all of the variables are:
Can anyone help? Thanks.
HWND hView = GetDlgItem(hwnd, IDC_MAINLIST);
LVColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT ;
LVColumn.fmt = LVCFMT_LEFT;
LVColumn.pszText = "Column Title";
LVColumn.cchTextMax = lstrlen("Column Title");
LVColumn.iSubItem = 0;
LVColumn.iImage = 0;
LVColumn.iOrder = 0;
That code is for a listview. It is a different control than a listbox.
Oh, ok. Thanks. Should I use that instead for my project?
Ok, found info on MSDN, should be enough, thanks.
That code looks familiar....
A listview is 'mostly' a listbox with a different set of 'styles' (ie multi columns).
Originally Posted by Welder