Board index » delphi » Fancy user interface (skins ala. WinAmp)

Fancy user interface (skins ala. WinAmp)

Anyone got an idea of how fancy userinterface like found in WinAmp and other
Mp3-players? Typicall iregular shaped windows, and non-standard buttons and
gadgets.
OK - I have do admitt that I doesn't alway like non-standard window apps,
but sometimes adding a little spice is good...
:-)
 

Re:Fancy user interface (skins ala. WinAmp)


It is possible but you'll need to write your own Class for your window. This
means you will have to get the windows messages from the Desktop and check if it
applies to your window. e.g.: You get a On_Click message for the Window handle 0
(which is your desktop), you check if the mouse pointer is in the window
boundaries you drawn and then proceed to the appropriate procedures.

Maybe there is other ways to do it, you could check at WinAmp developper page
(http://www.winamp.com/plugins/dev.html) , it's in C++, maybe it's said how
there. I already coded something like that and I can tell it really hurts the
coder's ass.

But if you know C++, I suggest you to code it in C++, it's way easier (at least
for what I know). Maybe there is an easy way to do it in Delphi. That is my
point of view.

Hope that help ;)
...................................................................@.Jansim

Quote
HENRIK EIDEM KURKA wrote:
> Anyone got an idea of how fancy userinterface like found in WinAmp and other
> Mp3-players? Typicall iregular shaped windows, and non-standard buttons and
> gadgets.
> OK - I have do admitt that I doesn't alway like non-standard window apps,
> but sometimes adding a little spice is good...
> :-)

Re:Fancy user interface (skins ala. WinAmp)


Quote
>HENRIK EIDEM KURKA wrote:

>> Anyone got an idea of how fancy userinterface like found in WinAmp and
other
>> Mp3-players? Typicall iregular shaped windows, and non-standard buttons
and
>> gadgets.
Jansim wrote in message <36FFEC1F.9FD09...@devicom.com>...
>It is possible but you'll need to write your own Class for your window.
This
>means you will have to get the windows messages from the Desktop and check
if it
>applies to your window. e.g.: You get a On_Click message for the Window
handle 0
>(which is your desktop), you check if the mouse pointer is in the window
>boundaries you drawn and then proceed to the appropriate procedures.

>Maybe there is other ways to do it

For irregular windows, there are several very good freeware Delphi
components (for most every version) that make this incredibly easy. The best
I've found so far, IMHO, is a nice little component called CoolForm... that
I think I picked up from Torry's pages.

For irregular buttons, again, there are several components (I think the same
package that contained CoolForm contained a component for non-standard
buttons as well)... but they're actually incredibly easy to impliment
yourself, if you care to... you can create the entire interface on a single
bitmap, load it up into a TImage, or draw it directly to the Form's canvas,
then make what are called regions. Regions are, essentially, hot spots...
the areas in the window that are interactive. You can use the API calls
CreateRectRgn, CreateRoundRectRgn, CreateEllipticRgn, or CreatePolygonRgn,
amoung others, to make regions that are the exact shapes you want. Then, in
the OnClick event for the TImage (or the Form), check to see if the
mouseclick was within a given region with PtInRegion, etc.  Check the
Win32.hlp for more information.

Other Threads