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. S.O.S ---- CListCtrl

S.O.S ---- CListCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphicshelptutorial
2 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.
  • S Offline
    S Offline
    Shankar Chandra Bose
    wrote on last edited by
    #1

    Chaps, Am using an ownerdraw VIRTUAL list control (an example of this can be found at codeproject in an earlier program I wrote-the hextext control). How do I set the HEIGHT of an item in CListCtrl? I am not using any image lists/bmps or the sort at all...totall owner drawn, I do my drawing in OnDrawItem. I am passed a DRAWITEMSTRUCT pointer that contains the bounding rect, hdc, etc...that I need. Problem is, I want to set the item HEIGHT. In other words, I need a way to alter the bounding rect-before I get it in the OnDrawItem. Icons/imagelists are out, as I am usign the virtual style. Each item is completely under my control-I am responsible for rendering it. Any suggestions would be very much appreciated. "When it's done." - 3D Realms.

    P 1 Reply Last reply
    0
    • S Shankar Chandra Bose

      Chaps, Am using an ownerdraw VIRTUAL list control (an example of this can be found at codeproject in an earlier program I wrote-the hextext control). How do I set the HEIGHT of an item in CListCtrl? I am not using any image lists/bmps or the sort at all...totall owner drawn, I do my drawing in OnDrawItem. I am passed a DRAWITEMSTRUCT pointer that contains the bounding rect, hdc, etc...that I need. Problem is, I want to set the item HEIGHT. In other words, I need a way to alter the bounding rect-before I get it in the OnDrawItem. Icons/imagelists are out, as I am usign the virtual style. Each item is completely under my control-I am responsible for rendering it. Any suggestions would be very much appreciated. "When it's done." - 3D Realms.

      P Offline
      P Offline
      Paolo Messina
      wrote on last edited by
      #2

      I think you have to handle the WM_MEASUREITEM message, but the height you set will affect all the rows, because the ListView control uses a LVS_OWNERDRAWFIXED style (fixed height). Paolo ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)

      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