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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CListCtrl

CListCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
helpdesignquestion
4 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.
  • S Offline
    S Offline
    solex
    wrote on last edited by
    #1

    Hi using the style LVCFMT_RIGHT in CListCtrl::InsertColumn(..) will right justify any text in any but the first column. Anybody knows about that - is that by design or a bug and how could I get my first column right justified? Thanks for any help Solex

    P M S 3 Replies Last reply
    0
    • S solex

      Hi using the style LVCFMT_RIGHT in CListCtrl::InsertColumn(..) will right justify any text in any but the first column. Anybody knows about that - is that by design or a bug and how could I get my first column right justified? Thanks for any help Solex

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

      I think InsertColumn() works only with columns after the first, because you're adding a new column while the first already exists. Try with SetColumn() instead. Cheers, Paolo.

      1 Reply Last reply
      0
      • S solex

        Hi using the style LVCFMT_RIGHT in CListCtrl::InsertColumn(..) will right justify any text in any but the first column. Anybody knows about that - is that by design or a bug and how could I get my first column right justified? Thanks for any help Solex

        M Offline
        M Offline
        Mike Dunn
        wrote on last edited by
        #3

        Nope, that's by design. To get the text right-justified, you can use custom draw. See my article in the list control section for a tutorial on using custom draw.

        1 Reply Last reply
        0
        • S solex

          Hi using the style LVCFMT_RIGHT in CListCtrl::InsertColumn(..) will right justify any text in any but the first column. Anybody knows about that - is that by design or a bug and how could I get my first column right justified? Thanks for any help Solex

          S Offline
          S Offline
          solex
          wrote on last edited by
          #4

          Hi solved it by first inserting a 0 width column - seems to work just fine. Thank you all Solex

          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