VC interface solution

Source: Internet
Author: User

VC interface solution

Keywords: VC skin

-Introduction

VC uses the mature interface component vclskin in Delphi. vclskin has the source code and more than one hundred skins. It is used as a Dll and the effect is quite good.

2. effect Preview

The results in the instance are as follows:

Effect Preview

 

Iii. Call Methods

The following code is used to create the SkinTest of a VC project:

Declare HMODULE m_hModule;

The following statement declares global extern CSkinTestApp theApp;

 

Add the code to load the Dll and uninstall the Dll in the application class:

M_hModule = LoadLibrary ("Skin. dll ");

...... Load project files

FreeLibrary (m_hModule );

 

Call the LoadSkin function during initialization in the first dialog box of the program:

Void InitSkin (CString skinFile );

 

 

Typedef int (CALLBACK * FUNC) (PCHAR );

Void CSkinTestDlg: InitSkin (CString skinFile)

{

// Load the skin file

CHAR szName [MAX_PATH];

CString strName = GetAppPath () + "skins \" + skinFile + ". skn ";

FUNC pFunc = (FUNC) GetProcAddress (theApp. m_hModule, "LoadSkin ");

Strcpy (szName, strName );

PFunc (szName );

}

 

CString CSkinTestDlg: GetAppPath ()

{

CString strPath;

CHAR szPath [MAX_PATH + 1];

If (GetModuleFileName (NULL, szPath, MAX_PATH ))

{

StrPath = szPath;

Int nPos = strPath. ReverseFind ('\\');

If (nPos> = 0) strPath = strPath. Left (nPos + 1 );

}

Return strPath;

}

 

Call join

InitSkin ("skin03 ");//Load skin files during initialization

 

Dll and skin Download Links

Http://files.cnblogs.com/kenter/skin.rar

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.