The MASM Forum

General => The Campus => Topic started by: Grincheux on September 05, 2013, 05:03:12 AM

Title: Formating a listview column
Post by: Grincheux on September 05, 2013, 05:03:12 AM
Hi every One!


Into a listview column I need to display a comment.
This comment can be longer than the listview column.
I would like to display the comment on many lines but always in the same column.


As an example, all the text written here would have to be stored into one listview column.


How can I proceed ?
Thanks for your help (in advance)
Title: Re: Formating a listview column
Post by: jj2007 on September 05, 2013, 06:10:37 AM
Salut Grincheux,

There is no multiline style for listviews, but you can use ownerdraw and DrawRect.
Googling for listview multiline yields quite a number of hits, too.

See in particular Custom Draw With List-View Controls (http://msdn.microsoft.com/en-us/library/windows/desktop/ff919569%28v=vs.85%29.aspx#Cust_draw_LV_controls)
Title: Re: Formating a listview column
Post by: Grincheux on September 05, 2013, 02:27:04 PM
I thought that with the column format style : LVCFMT_LINE_BREAK it was possible. I read how to use it but I don't understand.
Title: Re: Formating a listview column
Post by: jj2007 on September 05, 2013, 03:43:01 PM
Looks like Vista/Win7 only...
Title: Re: Formating a listview column
Post by: sinsi on September 05, 2013, 08:30:57 PM
Quote from: MSDN
LVIF_COLFMT
Windows Vista and later. The piColFmt member is valid or must be set.

piColFmt
Windows Vista: Not implemented.
Ah, Microsoft.