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. Cell Manipulation in CListCtrl

Cell Manipulation in CListCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 3 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.
  • T Offline
    T Offline
    ttohme
    wrote on last edited by
    #1

    Hi, I am trying to manipulate a List Control at the cell level, trying to have let's say different cell width and heights in the same row. Can this be done, or does anyone know how to do it? THanks in advance.

    S 1 Reply Last reply
    0
    • T ttohme

      Hi, I am trying to manipulate a List Control at the cell level, trying to have let's say different cell width and heights in the same row. Can this be done, or does anyone know how to do it? THanks in advance.

      S Offline
      S Offline
      Stormwind
      wrote on last edited by
      #2

      I encountered same prob a year ago. I don't think there's a way. I also needed to use different fonts for each cell. Best bet is to use third party windows, i.e. grid controls etc. You can easily modify the width of each cell independently of each other though.

      B 1 Reply Last reply
      0
      • S Stormwind

        I encountered same prob a year ago. I don't think there's a way. I also needed to use different fonts for each cell. Best bet is to use third party windows, i.e. grid controls etc. You can easily modify the width of each cell independently of each other though.

        B Offline
        B Offline
        basementman
        wrote on last edited by
        #3

        Yes, you can control all aspects of the painting of each "cell" in a list view (reportmode). You need to use the LVS_OWNERDRAWFIXED style when creating it. Then, in your DrawItem handler, either call the default method for cells you are not interested in custom drawing, and paint the cell yourself for those that you want to control. See LVS_OWNERDRAWFIXED in the doc.

        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