Click here to Skip to main content
15,887,477 members
Articles / Desktop Programming / MFC

A Picture Based Skin System and MPEG Decoder

Rate me:
Please Sign up or sign in to vote.
4.86/5 (25 votes)
27 Jul 2000 440.9K   13.9K   149   99
A picture based skin system for MFC that allows the user to customise their dialogs. The system is demonstrated by presenting a fully functioning MPEG decoder application.

Sample Image - skinsyse.jpg

SkinSys Ver 1.0

A picture based skin system For MFC. Based on FriendSoft's (www.yeah.net/FriendSoft) SkinForm.

SkinSys is copyright 2000 Cüneyt ELÝBOL (www.celibol.freeservers.com)

Includes

  • CSkinsys codes
  • Simple Skin Editor
  • A Beautiful MPEG 1,2,3 decoder (Copyright www.eldos.org - Based On MAPlay Decoder)
  • MPEGPlayer project (not completed. It is only a sample.)

Directories

  • Decoder: MPEG Decoder codes
  • Editor: Skineditor Files
  • Sample: Sample Skin Files
  • SkinSys: CSkinsys Source Code
  • Root: MPEGPlayer Project

Requirement

This system only requires the "OleLoadPicture" function. (Please see the LoadPictureFile function in Skindialog.cpp.)

How to Use

Please read these notes and see the Sample Directory and MPEGPlayer project:

  1. Draw mask bitmap
  2. Draw main Bitmap
  3. If you need or want
    1. Draw mouse over bitmap
    2. Draw mouse down bitmap
    3. Draw disable bitmap
  4. Run Skineditor
  5. Select "Screens" Tab
  6. Fill All Pictures
  7. If you want, select "Preview" Button
  8. Save and exit
  9. Run Visual Studio
  10. Create a Dialog based new Project (for example, Dialog Name = CBaseDialog)
  11. Include "SkinDialog.h" (for example, in "StdAfx.h")
  12. Change to CBaseDialog : public CDialog to CBaseDialog : public CSkinDialog
  13. Go to CBaseDialog::OnInitDialog and add these lines:
    C++
    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();
  14. Compile and run.

Controlling Buttons Click, Trackbar, ProgressBar, Text, etc.

If you want these events in the Base Class (CSkinDialog):

  1. void ProgresChanged(CString m_Name); // If progress changes
  2. void MouseMoved(CString m_ButtonName, int x, int y); // if Mouse Moved
  3. void TrackChange(CString m_ButtonName, UINT nSBCode, UINT nPos); // if Trackbar change
  4. void ButtonPressed(CString m_ButtonName); // if Button Pressed

you should add these functions to your CBaseDialog class.

Changing the Tooltip

use Set<xxx>ToolTip function. <xxx> is Button, Text...
For example:

C++
SetButtonToolTip("BUTTON_USEEQ", "Equalizer is On");

Getting Value

use Get<xxx> function
For example:

C++
BOOL useEQ = GetButtonCheck("BUTTON_USEEQ"); // if BUTTON_USEEQ checked

Setting Value

use Set<xxx> function
For example:

C++
SetButtonCheck("BUTTON_USEEQ", useEQ); // if useEQ = True BUTTON_USEEQ is checked

Notes

Thanks for your interest in CSkinsys. This is the first release, and may have bugs and errors. Please report any bugs or errors, or any questions to me.

License

This article has no explicit license attached to it, but may contain usage terms in the article text or the download files themselves. If in doubt, please contact the author via the discussion board below.

A list of licenses authors might use can be found here.


Written By
Turkey Turkey
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generalbug in DrawBitmap Pin
Davide Pizzolato25-Feb-01 1:08
Davide Pizzolato25-Feb-01 1:08 
GeneralNo icon in taskbar Pin
7-Feb-01 21:52
suss7-Feb-01 21:52 
GeneralSkin Editor Sources Downloadable Pin
2-Feb-01 10:53
suss2-Feb-01 10:53 
GeneralSkin Editor Sources Downloadable Pin
2-Feb-01 10:52
suss2-Feb-01 10:52 
GeneralRe: Skin Editor Sources Downloadable Pin
21-Nov-01 13:38
suss21-Nov-01 13:38 
GeneralRe: error message Pin
24-Jan-01 11:31
suss24-Jan-01 11:31 
Generalerror message Pin
2-Jan-01 20:04
suss2-Jan-01 20:04 
GeneralRe: error message Pin
Christian Graus3-Jan-01 0:21
protectorChristian Graus3-Jan-01 0:21 
QuestionWhere can I find the mpeg 1 decoder ? Pin
8-Nov-00 16:41
suss8-Nov-00 16:41 
AnswerRe: Where can I find the mpeg 1 decoder ? Pin
Christian Graus9-Jul-01 15:57
protectorChristian Graus9-Jul-01 15:57 
GeneralList Control Pin
Lau28-Sep-00 20:31
Lau28-Sep-00 20:31 
GeneralRe: List Control Pin
MichaelD24-Oct-00 23:42
MichaelD24-Oct-00 23:42 
GeneralRe: List Control Pin
31-Jan-01 4:19
suss31-Jan-01 4:19 
GeneralRe: List Control Pin
23-Jul-01 12:07
suss23-Jul-01 12:07 
GeneralRe: List Control Pin
12-Apr-01 21:00
suss12-Apr-01 21:00 
GeneralRe: List Control Pin
2-Jul-01 5:05
suss2-Jul-01 5:05 
GeneralBasic Information about skins Pin
va24-Sep-00 20:00
va24-Sep-00 20:00 
GeneralRe: Basic Information about skins Pin
dcoffman225-Sep-00 7:59
dcoffman225-Sep-00 7:59 
Generallittle test Pin
Member 48414231-Jul-00 20:52
Member 48414231-Jul-00 20:52 
Generalerror Pin
Member 5442728-Jul-00 23:24
Member 5442728-Jul-00 23:24 
GeneralRe: error Pin
xyto23-Aug-00 4:49
xyto23-Aug-00 4:49 
GeneralRe: error Pin
Me Me23-Aug-00 4:54
Me Me23-Aug-00 4:54 
GeneralRe: error Pin
22-Jan-01 10:56
suss22-Jan-01 10:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.