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. Color of scrollbar of a listbox

Color of scrollbar of a listbox

Scheduled Pinned Locked Moved C / C++ / MFC
csharptutorial
5 Posts 4 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.
  • W Offline
    W Offline
    Ward 0
    wrote on last edited by
    #1

    Does anyone know how to set the color of the scrollbar of a listbox. I'm using win32. I've already tried several WM_CTLCOLOR... messages, but this did not work. Changing the colors of buttons and other controls works fine. Ward

    N 1 Reply Last reply
    0
    • W Ward 0

      Does anyone know how to set the color of the scrollbar of a listbox. I'm using win32. I've already tried several WM_CTLCOLOR... messages, but this did not work. Changing the colors of buttons and other controls works fine. Ward

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      Their is no way to change the color of scroll bar in a listbox. The scroll bar in it is Build in. u can either hide the default scroll bar and put urs Another method is http://www.codeproject.com/dialog/coolscroll.asp[^] nave

      N 1 Reply Last reply
      0
      • N Naveen

        Their is no way to change the color of scroll bar in a listbox. The scroll bar in it is Build in. u can either hide the default scroll bar and put urs Another method is http://www.codeproject.com/dialog/coolscroll.asp[^] nave

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

        But what about the detours library it uses...? - NS -

        S 1 Reply Last reply
        0
        • N Nishad S

          But what about the detours library it uses...? - NS -

          S Offline
          S Offline
          Stephen Hewitt
          wrote on last edited by
          #4

          You can't (legally) use Detours in a commercial product - I don't even think you can use it in a free product (again, legally). I haven’t read the license in a while but from memory it’s quite restrictive – I think you can use it for “research” purposes. Also it doesn't work properly on Win95/98/ME (but who cares?!?). I'd be surprised if you couldn't use subclassing to change the colour of the scrollbars. Steve

          N 1 Reply Last reply
          0
          • S Stephen Hewitt

            You can't (legally) use Detours in a commercial product - I don't even think you can use it in a free product (again, legally). I haven’t read the license in a while but from memory it’s quite restrictive – I think you can use it for “research” purposes. Also it doesn't work properly on Win95/98/ME (but who cares?!?). I'd be surprised if you couldn't use subclassing to change the colour of the scrollbars. Steve

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

            Stephen Hewitt wrote:

            I'd be surprised if you couldn't use subclassing to change the colour of the scrollbars.

            But we cannot take the handle of the default scrollbars. It is only a drawing, not a window, right? Further more the system paints it directly, in many cases( like thumb positioning, etc. ). So we cannot use the OnPaint also. That is why the detours is used. - NS -

            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