Set the flag in the resource editor for the listbox control to enable multi
columns. Then...
SendMessage( hListBox, LB_SETCOLUMNWIDTH, (WPARAM)( cxColumn ), 0L );
in my initialize dialog section.
I tried sending a string and it truncated the column. But now my question
is how do you send data to the second column? Tabs didn't work. Neither
did new lines "\n" or returns "\r"? Anyone have any ideas?
** Sender Unknown ** <** Sender Unknown **> wrote in message
<3c2ea...@news.newsgroups.com>...
>Can anybody show me how to create a multi-column listbox in win32?
>
>I don't want to use MFC.
>
>I can create single-column listboxes, but not multi-column.
>
>I try creating one in the resource editor on a dialog box, but the
>dialog box fails to create with it.
>
>
>-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
>http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> Check out our new Unlimited Server. No Download or Time Limits!
>-----== Over 80,000 Newsgroups - 19 Different Servers! ==-----
"Mark Henri" <markhenri@xxx_a_t_t_b_i_xxx.com> wrote in message
news:2aeY7.3461$4d5.21156@rwcrnsc54...
Multi-column list boxes work like list views in "List" mode. You can't give
each item multiple columns; instead, items are displayed in a new column
once the list is full enough.
Jeff Henkels wrote in message ...
Also, I want to clarify something. This feature has nothing to do with a
columnar list like the list control gives. It's a wrapping feature and the
data in the additional columns has nothing to do with the columns to the
left or right.
Tim Robinson wrote in message ...
1. set the the multiple column checkbox in the resource editor
2. SendMessage( hListBox, LB_SETCOLUMNWIDTH,(WPARAM)( 100 ), 0L );
3. for ( int n=0; n < 100; n++ ) SendMessage( hListBox, LB_ADDSTRING,
0L,(LPARAM)"this is a line" );
4. hold the down arrow and watch the scrolling action in the listbox; it
traverses down then to the right. There's no scroll bar ever.
Jeff Henkels wrote in message ...
Mark, sorry if I didn't get you again; you need something like
Explorer in "Details" view? If so, the closest you can obtain with
a List control is LBS_USETABSTOPS style and LB_SETTABSTOPS
message. This isn't the most beautiful stuff though (for example,
you can get only "left-aligned" tabs, which is rather ugly for numbers).
Of course, you have to replace entire list row each time you want
to change an item. Sometimes I even accompany those with push-like
radios on top to simulate a Header control. (Of course, you have to
do the sorting yourself).
Jugoslav
________________________
www.geocities.com/jdujic