博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Creating Skins with SkinSys Ver 1.0
阅读量:6123 次
发布时间:2019-06-21

本文共 2265 字,大约阅读时间需要 7 分钟。

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
  1. Draw mask bitmap
  2. Draw main Bitmap
  3. If you need or want
    • Draw mouse over bitmap
    • Draw mouse down bitmap
    • 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
  14. Add these lines
    char m_skin[512];sprintf(m_skin, "
    ");SetMenuID(IDR_MAINMENU);SetWindowText("MPEG Player");SetSkinFile(m_skin);CSkinDialog::OnInitDialog();
  15. 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); void MouseMoved(CString m_ButtonName, int x, int y); void TrackChange(CString m_ButtonName, UINT nSBCode, UINT nPos); void ButtonPressed(CString m_ButtonName);
You 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");
  • Setting Value Use one of the Set<xxx> functions. For example:
    SetButtonCheck("BUTTON_USEEQ", useEQ);

转载地址:http://bbzua.baihongyu.com/

你可能感兴趣的文章
初识中间件之消息队列
查看>>
MyBatis学习总结(三)——优化MyBatis配置文件中的配置
查看>>
Spring常用注解
查看>>
我的友情链接
查看>>
PCS子层有什么用?
查看>>
查看端口,关闭端口
查看>>
代码托管平台简介
查看>>
linux:yum和apt-get的区别
查看>>
Sentinel 1.5.0 正式发布,引入 Reactive 支持
查看>>
如何对网站进行归档
查看>>
数据库之MySQL
查看>>
2019/1/15 批量删除数据库相关数据
查看>>
数据类型的一些方法
查看>>
Mindjet MindManager 2019使用教程:
查看>>
游戏设计的基本构成要素有哪些?
查看>>
详解 CSS 绝对定位
查看>>
AOP
查看>>
我的友情链接
查看>>
NGUI Label Color Code
查看>>
.NET Core微服务之基于Polly+AspectCore实现熔断与降级机制
查看>>