Skinmagic perfect Summary

Source: Internet
Author: User

I have always wanted to make a beauty program for my own vc6, so I found this skinmagic. Although there are many instructions on the use of this software on the internet, however, in actual use, you will always encounter some problems. After repeated exploration and summarization, you will have this article, hoping to help you.

Procedure:

1. Put skinmagiclib. H, skinmagiclibmt6.lib, and skinmagiclibmd6.lib in your vc6 project directory.

2. Add in stdafx. h

# Include "skinmagiclib. H"

3. Add the corresponding Library to the Project Settings

Note:

1. When using DLL, skinmaigc. dll and program packaging are required during program release.

2. If you use a static library, you do not need to rely on the DLL file. The specific method is:

Prerequisites 1: You have selected use MFC in a static lirary in project/settings/General/. In this case, you must use the static library skinmagiclibmt6.lib for both Debug and release versions.

1) debug version: Select "Debug multithreaded" under C ++/code generation of project/setting ".

2) release version: Select "multithreaded"

Prerequisites 2: You have selected use MFC in a shared DLL in project/settings/General/. In this case, you must use the static library skinmagiclibmd6.lib for both Debug and release versions.

3) debug version: Select "Debug multithreaded DLL" under C ++/code generation of project/setting ".

4) release version: Select "multithreaded DLL"

In this example, MT indicates multithreaded, while MD indicates multithreaded DLL.

Select under the generation label. If your project uses a static library of the MT type, select "Debug multithreaded" and "release" for the debug version.

Select "multithreaded" for the version. If you want to use a static library of the MD type, select "Debug multithreaded DLL" and "release" for the debug version.

Select "multithreaded DLL ".

Self-built http://www.pediy.com/bbshtml/BBS6/pediy6615.htm

4. Add the code to initialize the skinmagic resource at the beginning of the initinstance () function.

Verify (1 = initskinmagiclib (AfxGetInstanceHandle (), "Demo ",

Null,

Null ));

Verify (1 = loadskinfile ("devior. SMF "));

Verify (1 = setdialogskin ("dialog"); // set the skin of the dialog box

 

5. Load the skin file in the initinstance () function and set the program skin.

You can add skin files to resources and compile them into programs. Or the program dynamically loads skin files at runtime.

A. For example, add Corona. SMF, set the resource type to "skinmagic", and the resource ID to idr_skin_corona.

 

Cbosskeydlg DLG;

M_pmainwnd = & DLG;

 

// Load skinmagic skin

Verify (1 = loadskinfromresource (null, (lpstr) idr_skin_corona, "skinmagic "));

Verify (1 = setwindowskin (m_pmainwnd-> m_hwnd, "mainframe"); // set the window skin

Verify (1 = setdialogskin ("dialog"); // set the skin of the dialog box

 

Int nresponse = DLG. domodalex (bstartshow );

If (nresponse = idok)

{

}

Else if (nresponse = idcancel)

{

}

B. The program dynamically loads skin files during runtime

 

Cbosskeydlg DLG;

M_pmainwnd = & DLG;

 

// Load skinmagic skin

Verify (1 = loadskinfile ("Corona. SMF "));

Verify (1 = setwindowskin (m_pmainwnd-> m_hwnd, "mainframe "));

Verify (1 = setdialogskin ("dialog "));

 

Int nresponse = DLG. domodalex (bstartshow );

If (nresponse = idok)

{

}

Else if (nresponse = idcancel)

{

}

 

6. Release skinmagic Resources in the exitinstance () function

// Release the skinmagic Resource:

Exitskinmagiclib ();

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.