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. CListCtrl Scrollbar

CListCtrl Scrollbar

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • K Offline
    K Offline
    Konrad Windszus
    wrote on last edited by
    #1

    How do I always show the vertical scrollbar in an CListCtrl (report view)? Just call ShowScrollBar( SB_VERT, true ); in every OnSize method doesn't work, because then the last column (which has the flag LVSCW_AUTOSIZE_USEHEADER) is too big. The implementation of the CListCtrl seems to be really clumsy, because it is somehow handled completely different than in any other WIN32-Control. Thanks for any answer. Konrad

    J 1 Reply Last reply
    0
    • K Konrad Windszus

      How do I always show the vertical scrollbar in an CListCtrl (report view)? Just call ShowScrollBar( SB_VERT, true ); in every OnSize method doesn't work, because then the last column (which has the flag LVSCW_AUTOSIZE_USEHEADER) is too big. The implementation of the CListCtrl seems to be really clumsy, because it is somehow handled completely different than in any other WIN32-Control. Thanks for any answer. Konrad

      J Offline
      J Offline
      JussiL
      wrote on last edited by
      #2

      Hi, I'm trying to solve the very same problem and I haven't been successfull with that ShowScrollbar-function either.. It doesn't help that I'm not that experienced with MFC. I'm wondering that could this be solved by simply using the WS_VSCROLL style when creating the control? Well, in my app the scrollbar _does_ show in certain situations when using that style (even if there are only few items in the report view and therefore no actual need for the scrollbar) but I haven't been able to pinpoint the exact conditions for this. My guess is that this behavior has something to do with redrawing.. You tell me :) But hey, give it a try and let the world know if it works.. -Jussi

      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