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. How to ownerdraw a scrollbar inside a listbox?

How to ownerdraw a scrollbar inside a listbox?

Scheduled Pinned Locked Moved C / C++ / MFC
c++questiongraphicshelptutorial
5 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.
  • K Offline
    K Offline
    KellyR
    wrote on last edited by
    #1

    Hi, I'm trying to do this program in C++ without MFC that creates an owner-drawn listbox with the WS_VSCROLL style. Owner drawing the listbox and listbox items is not a problem, but how do I owner draw the vertical scrollbar within the listbox? Even if I set the listbox style to LBS_OWNERDRAWVARIABLE or LBS_OWNERDRAWFIXED, the scrollbar still seems to draw normally. Thanks!

    KR

    H N 2 Replies Last reply
    0
    • K KellyR

      Hi, I'm trying to do this program in C++ without MFC that creates an owner-drawn listbox with the WS_VSCROLL style. Owner drawing the listbox and listbox items is not a problem, but how do I owner draw the vertical scrollbar within the listbox? Even if I set the listbox style to LBS_OWNERDRAWVARIABLE or LBS_OWNERDRAWFIXED, the scrollbar still seems to draw normally. Thanks!

      KR

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      replace a window's internal scrollbar with a customdraw scrollbar control[^](with MFC).

      K 1 Reply Last reply
      0
      • H Hamid Taebi

        replace a window's internal scrollbar with a customdraw scrollbar control[^](with MFC).

        K Offline
        K Offline
        KellyR
        wrote on last edited by
        #3

        That example uses MFC which I am not using in this program, also what I want to do is ownerdraw the internal scrollbar itself, I don't want to superimpose a new scrollbar control over top of the listbox. Isn't there a way to set the listbox's scrollbar to ownerdraw and handle that?

        KR

        1 Reply Last reply
        0
        • K KellyR

          Hi, I'm trying to do this program in C++ without MFC that creates an owner-drawn listbox with the WS_VSCROLL style. Owner drawing the listbox and listbox items is not a problem, but how do I owner draw the vertical scrollbar within the listbox? Even if I set the listbox style to LBS_OWNERDRAWVARIABLE or LBS_OWNERDRAWFIXED, the scrollbar still seems to draw normally. Thanks!

          KR

          N Offline
          N Offline
          Nishad S
          wrote on last edited by
          #4

          Try this[^]

          K 1 Reply Last reply
          0
          • N Nishad S

            Try this[^]

            K Offline
            K Offline
            KellyR
            wrote on last edited by
            #5

            Thanks, I was able to find what I needed in that article.

            KR

            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