Use Skin ++ to beautify the appearance of MFC

Source: Internet
Author: User

Use Skin ++ to beautify the appearance of MFC

Skin ++Use

I.Skin

Copy three files, SkinPPWTL. lib, skinppwtl. dll, and SkinPPWTL. h, and the corresponding skin (**. ssk), to the project folder. Generally, these files are stored in the Debug folder.


1. Add SkinPPWTL. lib to (VC7) "Project-> properties-> linker-> input-> additional dependency ".

Or add SkinPPWTL. lib to (VC6) "Project-> Settings-> Link-> Object/library ".


2. Add # include "SkinPPWTL. h" to the StdAfx. h file"
//..
# Endif // _ AFX_NO_AFXCMN_SUPPORT
# Include "SkinPPWTL. h" // Add

// {AFX_INSERT_LOCATION }}
//..

3. Add the following to the BOOL CXXApp: InitInstance () function:
BOOL CWwApp: InitInstance ()
{

AfxEnableControlContainer ();

//...
SkinppLoadSkin (_ T ("blue. ssk"); // blue. ssk is the skin file under the project.

# Ifdef _ AFXDLL

//...
}
Note: The above assumptions (assuming that the blue. ssk skin has been placed under the project folder), if not, change the path settings.

4. Add the header file "SkinPPWTL. h" to ** Dlg. h"

5. Add the header file SkinPPWTL. h to the project.

II.UninstallSkin ++ 

Add ExitInstance () to the program's uninstall Function ()
ExitSkin ();

3..Skin replacement 

Dynamic skin replacement can be implemented by executing the LoadSkin function.

LoadSkin (_ T ("XPCorona. ssk ");

Thu.Function Description

InitializeSkin is the initialization function of SKin ++. You can use the following parameters to load Skin ++:
InitializeSkin (skin file name );
NOTE: If there is no path in the skin file name, the current directory is used.

LoadSkin (skin file name );
NOTE: If there is no path in the skin file name, the current directory is used.

V..Notes for using a separator form

You must use the SKINPLUSPLUS_SPLITTER () and SKINPLUSPLUS_INIT_SPLITTER (m_wndSplitter) macros.

Note: SKINPLUSPLUS_INIT_SPLITTER is generally input into the separator object m_wndSplitter

For example:

......................

SKINPLUSPLUS_SPLITTER ()

Int CMainFrame: OnCreate (maid)
{
SKINPLUSPLUS_INIT_SPLITTER (m_wndSplitter );

......................

Sat..File description

Readme.htm the document you are reading
DLL uses the file directory required by Skin ++ (open)
Skins skin directory (open)
Sample is the demo program directory
DLG is a dialog box demo (open)
SDI is a demo program on the document interface. It also demonstrates the use of separators (open)
MDI multi-Document Interface demo (open)
Dockbar demonstrates the window (open)

Note: Use of SKIN ++ in VS2005. Note that the free version of SKIN ++ only supports ANSI, but the default version of VS2005 is UNICODE. If you do not change the encoding to ANSI during link compilation, the Code cannot be generated normally.

Select project-properties-General-language-Multi-byte character set.

 

Is three files (SkinPPWTL. lib, skinppwtl. dll, SkinPPWTL. h), Add a skin file. There are four files in total. during runtime, four files need to be put under the program file. However, after the DEBUG file is generated, if you want the program in the DEBUG file to run directly, you need to put the skin file and DLL dynamic connection library file into the DEBUG file. The RELEASE file is the same. During packaging, you can pack the four files together!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.