This example shows what you can do with the new UpdateLayeredWindow API in windows XP. This version supports resizing and colorizing the skin at runtime.
Get it at my website: http://www20.brinkster.com/qweerdy
This is a picture of the program in action:
Get it at my website: http://www20.brinkster.com/qweerdy
This is a picture of the program in action:
damn that really looks sweeet! :grin:
nice work Qweerdy :alright:
nice work Qweerdy :alright:
I agree with Savage, it is excellent ! :alright:
Qweerdy, looks awesome! :alright:
I'm flattered that you used my HSL conversion routines. I'm very glad somebody got some use out of them.
Remember that RGB2HSL takes a 00bbggrr dword. (0 hue = red) so you'll have to convert if you want to get the true hue.
Or to make things easier change the first 3 lines of RGB2HSL to:
Again, very good job. It looks great.
I'm flattered that you used my HSL conversion routines. I'm very glad somebody got some use out of them.
Remember that RGB2HSL takes a 00bbggrr dword. (0 hue = red) so you'll have to convert if you want to get the true hue.
Or to make things easier change the first 3 lines of RGB2HSL to:
[size=12]
movzx esi, byte ptr [dwRGB+[color=red]0[/color]]
movzx edi, byte ptr [dwRGB+1]
movzx ebx, byte ptr [dwRGB+[color=red]2[/color]][/size]
Again, very good job. It looks great.
Thanks everyone for the kind comments!
I'm currently working on encapsulating the scrollbar code in a custom control, to clean up the main WndProc and make control creation & handling as easy as with normal windows. I've got the hardest part done already, that is the painting mechanism of the control, but now I still have to get the mouse handling working again.
It's going to be very easy to use, just create a control like this:
And it will behave like a normal scrollbar... except it will be skinned with a PNG with a alpha channel :)
Iblis:
I've made the change, but the Hue values still don't match those in PSP (they're off by 128). However, I don't really care as you'll usually want to set it by looking at the resulting window anyway. I was very glad to find your code, without it it would have taken some time before I would have colorizing done. :alright:
I'm currently working on encapsulating the scrollbar code in a custom control, to clean up the main WndProc and make control creation & handling as easy as with normal windows. I've got the hardest part done already, that is the painting mechanism of the control, but now I still have to get the mouse handling working again.
It's going to be very easy to use, just create a control like this:
invoke LoadPng,ResourceID,0
invoke LayeredScrollbar, hWnd, eax, x, y, width, height, ScrollMax, ControlID
And it will behave like a normal scrollbar... except it will be skinned with a PNG with a alpha channel :)
Iblis:
I've made the change, but the Hue values still don't match those in PSP (they're off by 128). However, I don't really care as you'll usually want to set it by looking at the resulting window anyway. I was very glad to find your code, without it it would have taken some time before I would have colorizing done. :alright:
Hmm, strange.
The reason I did it in reverse (00bbggrr) from the normal is because that's how I needed it, but it would seem more practical to use 00rrggbb.
I will modify the code to work with 00rrggbb and repost it.
The reason I did it in reverse (00bbggrr) from the normal is because that's how I needed it, but it would seem more practical to use 00rrggbb.
I will modify the code to work with 00rrggbb and repost it.
very impressive!
if the 42<HUE<128 you see a grid over the window
(try to move the window over a white window )
if the 42<HUE<128 you see a grid over the window
(try to move the window over a white window )
I figured out what's wrong.
I posted how to modify RGB2HSL but I neglected to reflect those changes in HSL2RGB.
Also change the last lines of HSL2RGB to:
and it'll work. Here's the .exe if you want to see.
I posted how to modify RGB2HSL but I neglected to reflect those changes in HSL2RGB.
Also change the last lines of HSL2RGB to:
[size=12]@done: bswap eax
shr eax, 8
ret[/size]
and it'll work. Here's the .exe if you want to see.
iblis: Thanks, now it's perfect :alright:
eko: Aw... I though I fixed the grid problem. It's not a problem with the source however, it's just the skin image. The darker border from the bottom right tile partially got onto the center tile :( I'll just fire up Paint Shop Pro, see what I can do...
eko: Aw... I though I fixed the grid problem. It's not a problem with the source however, it's just the skin image. The darker border from the bottom right tile partially got onto the center tile :( I'll just fire up Paint Shop Pro, see what I can do...
Here is the new png skin, just place it in the /res directory and recompile the resources and then the program.