Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ListView, tile mode & multiple lines - how???

ListView, tile mode & multiple lines - how???

Scheduled Pinned Locked Moved C / C++ / MFC
csharptutorialquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vlasta_
    wrote on last edited by
    #1

    Hello all, I'd like to know how to make a Win32 list view control show multiple lines of text beside the icon just like Explorer does: |||| file_name.txt |||| Text document |||| October 10th 2007 I want to be able to control the text on each line and I am having no success, it just wraps a single line of text if it does not fit on one line. No matter what I do - adding columns, putting newlines to the text, setting number of lines with LVM_SETTILEVIEWINFO... nothing helps. So far I have found only .net examples please, which are useless to me. Thanks for any pointers.

    R 1 Reply Last reply
    0
    • V Vlasta_

      Hello all, I'd like to know how to make a Win32 list view control show multiple lines of text beside the icon just like Explorer does: |||| file_name.txt |||| Text document |||| October 10th 2007 I want to be able to control the text on each line and I am having no success, it just wraps a single line of text if it does not fit on one line. No matter what I do - adding columns, putting newlines to the text, setting number of lines with LVM_SETTILEVIEWINFO... nothing helps. So far I have found only .net examples please, which are useless to me. Thanks for any pointers.

      R Offline
      R Offline
      Roger Broomfield
      wrote on last edited by
      #2

      Just for a bit of masochistic fun I decided to try and do this using MFC 6, the class CListCtrl of which doesnt include any explicit support for TileView. 1. ensure _WIN32_IE and _WIN32_WINNT are both defined to 0x0501 for the entire project 2. in OnCreate of CMyListView use supported InsertColumn to add 4 columns, then SendMessage(LVM_SETVIEW,,) and SendMessage(LVM_SETTILEVIEWINFO,,) specifying 2 columns 3. for each item added SendMessage(LVM_SETTILEINFO,,) listing the columns I want to see 4. make an application manifest for the exe, I used the myapp.exe.manifest XML file method rather than the resource method Hey presto multiline TileView using MFC 6, if any one of those steps is omitted then I dont get multiline TileView.

      V 1 Reply Last reply
      0
      • R Roger Broomfield

        Just for a bit of masochistic fun I decided to try and do this using MFC 6, the class CListCtrl of which doesnt include any explicit support for TileView. 1. ensure _WIN32_IE and _WIN32_WINNT are both defined to 0x0501 for the entire project 2. in OnCreate of CMyListView use supported InsertColumn to add 4 columns, then SendMessage(LVM_SETVIEW,,) and SendMessage(LVM_SETTILEVIEWINFO,,) specifying 2 columns 3. for each item added SendMessage(LVM_SETTILEINFO,,) listing the columns I want to see 4. make an application manifest for the exe, I used the myapp.exe.manifest XML file method rather than the resource method Hey presto multiline TileView using MFC 6, if any one of those steps is omitted then I dont get multiline TileView.

        V Offline
        V Offline
        Vlasta_
        wrote on last edited by
        #3

        It seems that I have overlooked the LVM_SETTILEINFO message and thought that LVM_SETTILEVIEWINFO is all that is needed. Thanks for helping me, you have saved me a lot of time!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups