April 29, 2024, 10:48:17 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


CSkinWindow

Started by ExMember001, November 11, 2006, 01:16:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ExMember001

November 11, 2006, 01:16:53 AM Last Edit: November 11, 2006, 01:26:37 AM by KrYpT
Here is CSkinWindow Class.
This Class have 1 function for the moment, to skin a Captionless Window and Create irregular windows shape.
To Use it, You need a picture (bmp,jpg,gif) and a region file (rgn) created by a RGN Generator:
http://www.codeguru.com/tools/standalonetools/article.php/c1389/
then use the function in your program

SetSkin(CWindow *Handle, STRING RgnPath, STRING PicturePath, INT ImgWidth, INT ImgHeight, INT CloseOnError),INT
Handle       : Pointer to a CWindow Class Handle.
RgnPath      : The Path to the Externally generated .rgn file.
PicturePath  : The Path to an Image file (bmp,jpg,gif).
ImgWidth     : The Width of the Image file.
ImgHeight    : The Height of the Image file.
CloseOnError : True to close the window to skin if an error occur, False to continue.
Return       : True if the Skin is Set, False on Error.

example :

#include "CSkinWindow.inc"
CSkinWindow skn;
skn.SetSkin(this, getstartpath()+"Skin.rgn", getstartpath()+"Skin.bmp", 640, 480, true);

J B Wood (Zumwalt)


Zen

Hmmmm. CCL has a class called CSkinWindow :P But not to wory as I have decided to do away with the original design of the skinning for CCL. Rather than having to do it all yourself, the new skin engine uses hooks to modify the messages sent by windows and re-draws your application and controls. Anyone who has the ATI catalyst software installed, that is how it will work :D

Lewis