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. Hiding vertical scrollbar in CListCtrl

Hiding vertical scrollbar in CListCtrl

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

    I want to hide vertical scroll bar in CListCtrl derived class I tried this code in PreCreateWindow: DWORD dwStyle = cs.style; if(dwStyle & WS_VSCROLL) { dwStyle &= ~WS_VSCROLL; cs.style = dwStyle; } and this in OnSize: DWORD dwStyle = ::GetWindowLong(GetSafeHwnd(), GWL_STYLE); if(dwStyle & WS_VSCROLL) { ::SetWindowLong(GetSafeHwnd(), GWL_STYLE, dwStyle & (~WS_VSCROLL)); } but it doesnt work, I still have scrollbar any suggestions? thankx in advance nobody is perfect

    J Y 2 Replies Last reply
    0
    • M mishgun

      I want to hide vertical scroll bar in CListCtrl derived class I tried this code in PreCreateWindow: DWORD dwStyle = cs.style; if(dwStyle & WS_VSCROLL) { dwStyle &= ~WS_VSCROLL; cs.style = dwStyle; } and this in OnSize: DWORD dwStyle = ::GetWindowLong(GetSafeHwnd(), GWL_STYLE); if(dwStyle & WS_VSCROLL) { ::SetWindowLong(GetSafeHwnd(), GWL_STYLE, dwStyle & (~WS_VSCROLL)); } but it doesnt work, I still have scrollbar any suggestions? thankx in advance nobody is perfect

      J Offline
      J Offline
      Jon Hulatt
      wrote on last edited by
      #2

      dwStyle &= LVS_NOSCROLL; Signature space for rent. Apply by email to....

      M 1 Reply Last reply
      0
      • J Jon Hulatt

        dwStyle &= LVS_NOSCROLL; Signature space for rent. Apply by email to....

        M Offline
        M Offline
        mishgun
        wrote on last edited by
        #3

        I need to hide only vertical scrollbar, horizontal should stay as is nobody is perfect

        1 Reply Last reply
        0
        • M mishgun

          I want to hide vertical scroll bar in CListCtrl derived class I tried this code in PreCreateWindow: DWORD dwStyle = cs.style; if(dwStyle & WS_VSCROLL) { dwStyle &= ~WS_VSCROLL; cs.style = dwStyle; } and this in OnSize: DWORD dwStyle = ::GetWindowLong(GetSafeHwnd(), GWL_STYLE); if(dwStyle & WS_VSCROLL) { ::SetWindowLong(GetSafeHwnd(), GWL_STYLE, dwStyle & (~WS_VSCROLL)); } but it doesnt work, I still have scrollbar any suggestions? thankx in advance nobody is perfect

          Y Offline
          Y Offline
          Yaron Nir
          wrote on last edited by
          #4

          Hello, I have the same problem in horizontal scroll, i am trying to make it disappear. i tried also in the OnSize same as you and it didn't work.... i would like to know if u solved the problem, if u did can u tell me how please? thanks in advanced Yaron Ask not what the application can do for you, ask what you can do for your application

          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