1. 新建MFC工程。
注:如果一开始勾选了“使用Unicode库”,会报错(error LNK2019: 无法解析的外部符号 "__declspec(dllimport))
此时需要设置:
2.将SkinPPWTL.lib SkinPPWTL.h 两个文件及相应皮肤(AlphaOS.ssk)拷贝至工程文件夹下 。以AlphaOS为例。
运行一下程序,将skinppwtl.dll及相应皮肤(AlphaOS.ssk)拷贝至新生成的Debug文件夹下
3.在VS中配置
注:如果编译的时候出现错误( This function or variable may be unsafe),则进行如下设置 _CRT_SECURE_NO_WARNINGS
4.在stdafx.h中添加头文件
#include "SkinPPWTL.h"
5.在C****App::InitInstance(),在该函数的第一句写上:
skinppLoadSkin(_T("AlphaOS.ssk"));
注:如果建立的是SDI/MDI程序,则要重载ExitInstance
int C****App::ExitInstance()
{
// TODO: Add your specialized code here and/or call the base class
skinppExitSkin();
return CWinApp::ExitInstance();
}
6.运行程序
皮肤库相关文件链接:
http://download.csdn.net/detail/qq_15947787/9671353