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. Where can I get the ListView alpha blended selection color? [modified]

Where can I get the ListView alpha blended selection color? [modified]

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

    Does anyone know where I can get the main alpha blended selection color? I know about LVS_EX_DOUBLEBUFFER for listviews, but this time I have to roll my own, and I'd rather it be consistent. I know that the border of the selection rect can be gotten from GetSysColor(COLOR_HIGHLIGHTTEXT) though. I tried using stylebuilder to see whether the color of the main selection rect came from a theme color, but couldn't find it :( -- modified at 15:13 Sunday 30th July, 2006

    Steve EcholsS 1 Reply Last reply
    0
    • J Justin Tay

      Does anyone know where I can get the main alpha blended selection color? I know about LVS_EX_DOUBLEBUFFER for listviews, but this time I have to roll my own, and I'd rather it be consistent. I know that the border of the selection rect can be gotten from GetSysColor(COLOR_HIGHLIGHTTEXT) though. I tried using stylebuilder to see whether the color of the main selection rect came from a theme color, but couldn't find it :( -- modified at 15:13 Sunday 30th July, 2006

      Steve EcholsS Offline
      Steve EcholsS Offline
      Steve Echols
      wrote on last edited by
      #2

      Use GetSysColor(COLOR_HIGHLIGHT) to get the background color, and GetSysColor(COLOR_HIGHLIGHTTEXT) to get the foreground or text color. Not sure what you mean by alpha blended selection color.


      - S 50 cups of coffee and you know it's on!

      • S
        50 cups of coffee and you know it's on!
        Code, follow, or get out of the way.
      J 1 Reply Last reply
      0
      • Steve EcholsS Steve Echols

        Use GetSysColor(COLOR_HIGHLIGHT) to get the background color, and GetSysColor(COLOR_HIGHLIGHTTEXT) to get the foreground or text color. Not sure what you mean by alpha blended selection color.


        - S 50 cups of coffee and you know it's on!

        J Offline
        J Offline
        Justin Tay
        wrote on last edited by
        #3

        Ah, I was actually referring to the selection marquee when you drag select items in the listview. You can try drag selecting items in explorer in Windows XP to see what I mean. Unless you disabled it, it should draw a rather nice alpha blended selection rectangle. Under performance options, Microsoft has it listed as "Show translucent selection rectangle".

        Steve EcholsS 1 Reply Last reply
        0
        • J Justin Tay

          Ah, I was actually referring to the selection marquee when you drag select items in the listview. You can try drag selecting items in explorer in Windows XP to see what I mean. Unless you disabled it, it should draw a rather nice alpha blended selection rectangle. Under performance options, Microsoft has it listed as "Show translucent selection rectangle".

          Steve EcholsS Offline
          Steve EcholsS Offline
          Steve Echols
          wrote on last edited by
          #4

          Yeah, that's not what I was thinking at all (but, it's the weekend, so thinking is at a minumum :)) I know nothing about the selection marquee, but this might hook you up. http://www.viksoe.dk/code/bluemarquee.htm[^]


          - S 50 cups of coffee and you know it's on!

          • S
            50 cups of coffee and you know it's on!
            Code, follow, or get out of the way.
          J 1 Reply Last reply
          0
          • Steve EcholsS Steve Echols

            Yeah, that's not what I was thinking at all (but, it's the weekend, so thinking is at a minumum :)) I know nothing about the selection marquee, but this might hook you up. http://www.viksoe.dk/code/bluemarquee.htm[^]


            - S 50 cups of coffee and you know it's on!

            J Offline
            J Offline
            Justin Tay
            wrote on last edited by
            #5

            Thanks :). I actually already know viksoe's site though. He's using COLOR_HIGHLIGHT and then blending to acheive the effect, which is what I'm already doing, but when I change the Selected Items color, I notice that only the border of the selection rectangle changes for the one in explorer. Maybe it's caching the color and not changing in response to WM_SETTINGCHANGE. I guess I'll have to live with it for the time being but I did go through all the colors in stylebuilder so I'm rather annoyed I couldn't find it. It would have been nice if Microsoft's theming documentation came with pictures of the theme parts and colors though.

            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