Page 1 of 1

Modern Windows style highlight marqee box?

Posted: 26 Dec 2009 18:20
by TsunamiZ
How about add a modern Windows style highlight marqee box? It's easier to see selection area...

Image

Re: Modern Windows style highlight marqee box?

Posted: 27 Dec 2009 17:17
by admin
This is actually something I'd really like to add but I can't seem to find any documentation about it. If any of you happens to know any API that does this kind of drawing let me know.

Re: Modern Windows style highlight marqee box?

Posted: 27 Dec 2009 18:52
by zer0
Having done some digging, I have discovered that ListView API has 'Extended List-View Styles'. One of those styles is LVS_EX_DOUBLEBUFFER, for which the description reads:

Code: Select all

Version 6.00. Paints via double-buffering, which reduces flicker. This extended style also enables alpha-blended marquee selection on systems where it is supported.
More information is in this MSDN resource: http://msdn.microsoft.com/en-us/library ... S.85).aspx Any use? :?

Re: Modern Windows style highlight marqee box?

Posted: 27 Dec 2009 19:09
by admin
zer0 wrote:Having done some digging, I have discovered that ListView API has 'Extended List-View Styles'. One of those styles is LVS_EX_DOUBLEBUFFER, for which the description reads:

Code: Select all

Version 6.00. Paints via double-buffering, which reduces flicker. This extended style also enables alpha-blended marquee selection on systems where it is supported.
More information is in this MSDN resource: http://msdn.microsoft.com/en-us/library ... S.85).aspx Any use? :?
Thanks, this looks like it's a thing native and restricted to the ListView. Now I don't use that ListView (everything in XY in owner-drawn), so I will have to make the thing myself. One day... and then you'll also be able to configure the color of it. :)

Re: Modern Windows style highlight marqee box?

Posted: 27 Dec 2009 19:40
by zer0
admin wrote:Thanks, this looks like it's a thing native and restricted to the ListView. Now I don't use that ListView (everything in XY in owner-drawn), so I will have to make the thing myself. One day... and then you'll also be able to configure the color of it. :)
Yes, it does appear to be OS-native, but should that be a deterrent? It being native sounds like even more of a reason to use it. Presence of 'translucent selection rectangle' (its "proper" name :P) in Explorer (XP onwards, maybe earlier OS too) is governed via a tickbox in system's settings, so its implementation in other apps that deal with lists of files becomes a given ;)

Re: Modern Windows style highlight marqee box?

Posted: 30 Dec 2009 14:45
by carmenm
Elplaylist is a plugin for foobar2000 that does the native selection feature of windows. Maybe you can ask how he does that. It s the user ssenna on the foobar2000 forum.

Re: Modern Windows style highlight marqee box?

Posted: 30 Dec 2009 18:22
by admin
carmenm wrote:Elplaylist is a plugin for foobar2000 that does the native selection feature of windows. Maybe you can ask how he does that. It s the user ssenna on the foobar2000 forum.
Thanks, but he most probably uses the ListView, so that won't help me.

But anyway: I know how to do this, but it's quite some work, and it's not my top priority now.