Creating Skins with SkinSys Ver 1.0
Posted
by Cuneyt Elibol
on July 26th, 2000
Introduction
SkinsSys is a picture-based skin system written in Visual C++/MFC and based on FriendSoft's SkinForm.Contents
This article (and its downloads) includes the following:- CSkinsys codes
- Simple Skin Editor
- A beatiful MPEG 1,2,3 decoder (Copyright www.eldos.org - based on the MAPlay Decoder)
- MPEGPlayer project
Download Directories
Once you download and extract the files, you'll see several new folders. Here is what each is used for.- Decoder: MPEG Decoder codes
- Editor : Skineditor Files
- Sample : Sample Skin Files
- SkinSys: CSkinsys Codes
- Root : MPEGPlayer Project
Requirements
This system only requires the "OleLoadPicture" function (Please see LoadPictureFile function in Skindialog.cpp)How to Use
Please Read This notes and see Sample Directory and MPEGPlayer project- Draw mask bitmap
- Draw main Bitmap
- If you need or want
- Draw mouse over bitmap
- Draw mouse down bitmap
- Draw disable bitmap
- Run Skineditor
- Select "Screens" Tab
- Fill All Pictures
- If you want select "Preview" Button
- Save and exit
- Run Visual Studio
- Create a Dialog based new Project (for example Dialog Name = CBaseDialog)
- Include "SkinDialog.h" (for example in "StdAfx.h")
- Change to CBaseDialog : public CDialog to CBaseDialog : public CSkinDialog
- Go to CBaseDialog::OnInitDialog
- Add these lines
char m_skin[512]; sprintf(m_skin, "<Your Skin Name>"); // If you want a menu < Activate to Right click > add this line SetMenuID(IDR_MAINMENU); // If you Want Caption SetWindowText("MPEG Player"); // Set To My SkinFile SetSkinFile(m_skin); CSkinDialog::OnInitDialog(); - Compile and Run
Controlling Button Clicks, Trackbar, ProgressBar and Text
Here are the protocols for the different events that you might want to handle in the base class (CSkinDialog)...void ProgresChanged(CString m_Name); // If progress changes void MouseMoved(CString m_ButtonName, int x, int y); // if Mouse Moved void TrackChange(CString m_ButtonName, UINT nSBCode, UINT nPos); // if Trackbar change void ButtonPressed(CString m_ButtonName); // if Button PressedYou can also add any of these functions to your class depending on your needs.
- Changing the tooltip
Use one of the Set<xxx>ToolTip functions. Where <xxx> is Button, Text, etc. For example:
SetButtonToolTip("BUTTON_USEEQ", "Equalizer is On"); - Getting Value
Use one of the Get<xxx> functions. For example:
BOOL useEQ = GetButtonCheck("BUTTON_USEEQ"); // if BUTTON_USEEQ checked) - Setting Value Use one of the Set<xxx> functions. For example:
SetButtonCheck("BUTTON_USEEQ", useEQ); // if useEQ = True BUTTON_USEEQ is checked)

Comments
Wonderful ! But it can not skin the window with caption and borders . Appface do it perfectly .
Posted by marstxj on 01/10/2005 09:55pmSkinSys can not skin the window with caption and borders, but appface can . AppFace for VC is no costs for non-commerical use ,you can download it from : http://www.appface.com
ReplyGood, but GDI leak
Posted by Legacy on 02/13/2004 12:00amOriginally posted by: Jiun-Yao Huang
I ran the executable in the .zip file and open the task manager. I found the number of GDI increasing continuously when I hovers the bottons.
ReplyProblems w/ buttons
Posted by Legacy on 10/09/2003 12:00amOriginally posted by: Tom
I am unable to render the buttons for my skinned dialog. Here are the steps I took to create the skin
1) Create a background bitmap with the buttons drawn on the background (as part of the same bitmap)
2) Create the mouse down bitmap (same as background w/ different colored buttons)
3) Create the slider buttons (normal and mouse down)
4) Create the mask
5) open the skin editor and add the mask, main and selected bitmaps...
6) go to the buttons tab and define 4 buttons, their sizes and locations. I verified the locations and sizes in Photoshop and checked the skin from the demo app to make sure my 0,0 location was correct (top left).
7) go to the sliders tab and create a slider and slider button
8) create a new dialog based app and add the appropriate calls in OnInitDialog
When I "Preview" the skin in the skin editor it looks and works perfectly.
When I launch the app I see the background but the buttons look like some sort of XP default buttons (which are probably drawn when CBitmapButton doesn't have a bitmap to associate w/ the button). They respond to mouse over and mouse down just like an XP button would. So obviously the buttons specified in the skin are not getting rendered to the screen. The slider is drawn and works perfectly.
I plan on doing more debugging and also trying my skin w/ the demo project to see what happens but it would be great if someone has an idea as to why this is happening.
-
-
ReplyReplace CDialog::OnPaint with CSkinDialog::OnPaint()
Posted by pivorules on 04/26/2004 11:54pmIn your dialog's OnPaint method, replace CDialog with CSkingDialog. In face, you may want to do this for all occurances in your dialog code.
ReplyDid you find the answer already?
Posted by Noam3.1 on 04/13/2004 01:01pmHi I have the same problem on XP Did you find the answer already?
Replyhttp://www.ucancode.net
Posted by Legacy on 05/13/2003 12:00amOriginally posted by: XD++ MFC Library with Source Code
The best kit
ReplyDisplaying label
Posted by Legacy on 02/18/2003 12:00amOriginally posted by: Yves
Hi,
I have just a simple question :
Is it possible to display Label text with left aligment ?
When I define my label area, I can choose policy, color, position, etc but not the aligment ??
May I have to call the SetTextAlign API somewhere ?
Thks for your help
ReplyYves
SkinMagic SDK : I think it's the best solution for write skinnable application for C/C++ user!
Posted by Legacy on 01/22/2003 12:00amOriginally posted by: joe
http://www.appspeed.com
SkinMagic SDK : I think it's the best solution for write skinnable application for C/C++ user!
Reply
spectrum analyzer
Posted by Legacy on 06/03/2002 12:00amOriginally posted by: matt ragnarsson
how can I insert a spectrum analyzer within this?
Reply
small problem
Posted by Legacy on 05/06/2002 12:00amOriginally posted by: Bao
when I call
Reply1. MPPlayer::SetLimits(pos1, pos2)
2. MPPlayer::SetPos(pos1)
3. MPPlayer::Play()
then I call MPPlayer::Pause() when MPPlayer::GetPos() is at pos2. But when I call this function again, the result is not the same(the output sound is different from the first time). why? Please help me!
lol
Posted by Legacy on 04/21/2002 12:00amOriginally posted by: lol
lol, people are dumb. how does a spectrum analyser even SORTOF relate (in code similarities) to a skinning package.
Newbs, go read more books & quick spamming sh*t like that.
ReplyRealy great work but can I ......
Posted by Legacy on 03/06/2002 12:00amOriginally posted by: Fred Junier
ReplyLoading, Please Wait ...