说明
使用SkinH.dll和*.she后缀的皮肤库进行动态换肤。
Demo下载https://download.csdn.net/download/shaoyiju/12701066
效果









关键逻辑
void CSkinDemoDlg::OnCbnSelchangeComboSkinStyle()
{
int nIndex = m_combSkin.GetCurSel();
if (nIndex < 0)
{
return;
}
string strSkinName = m_vctFiles[nIndex];
std::string strSkinPath;
strSkinPath = GetCurrentPath() + "\\" + strSkinName;
if (_access(strSkinPath.c_str(), 0) == -1)
{
return;
}
SkinH_DetachEx(m_hWnd);
int nLoadSkin = SkinH_AttachEx(strSkinPath.c_str(), NULL);
if (nLoadSkin != 0)
{
// 失败
return;
}
}
本文介绍了一种使用SkinH.dll和*.she后缀皮肤库实现的动态换肤技术,通过改变窗口外观达到换肤效果。文章提供了关键代码片段,演示了如何加载不同风格的皮肤文件并应用到应用程序界面。
1489

被折叠的 条评论
为什么被折叠?



