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