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