PDA

View Full Version : Windowed Gaming and Skins



Xorcist
16-11-2002, 05:38 AM
Anyone here write loley windowed games for desktop enjoyment? Stuff like card games, or arcade clones, or whatever. If so ever think about not using the defacto windowed interface? Maybe creating a "table" for those cards, or a "cabinet" for those arcade clones? Well I have, but I'm not sure where to start. So if anyone has any info on skinning please pass it my way, thanks. :)

Bobby
16-11-2002, 07:56 AM
I know that there are a couple of components that let you have odd shaped forms, but I cant remember the names of them. I think one was CoolForm but Im not sure :) but i know you can do this.

Viro
16-11-2002, 08:23 AM
There is a tutorial on flipcode on Skinning using the Win32 API. http://www.flipcode.com/articles/article_win32skins.shtml. Don't know if that's what you're looking for, but it should work as you can access the Win32 API from Delphi.

Don't know of any native Delphi components though...

Viro
16-11-2002, 08:24 AM
There is a tutorial on flipcode on Skinning using the Win32 API. http://www.flipcode.com/articles/article_win32skins.shtml. Don't know if that's what you're looking for, but it should work as you can access the Win32 API from Delphi.

Don't know of any native Delphi components though...

Alimonster
16-11-2002, 09:33 AM
http://gethelp.devx.com/techtips/delphi_pro/10min/10min1099.asp

That uses Canvas.Pixels, which is very slow and sucks. You'd want to load the picture up in a TBitmap and scan through it using Scanline, which will be approximately a zillion times faster. Also, you could change the bit that says "SetWindowRgn(TForm(Owner).Handle, Region, True);" to use TWinControl(Owner).Handle, which means it could be used to skin other win32 controls (which will have a handle - no non-TWinControls, however...).

If you install that and dump it Align=alClient on the form, you can skin it. With the above suggestions, you should have a generic skinable app. You probably only want to use a two-colour bitmap (black/white) to store the skin.