帮你看了一下 1 stdafx.h 中 #import "actskin4.ocx" no_implementation raw_interfaces_only raw_native_types using namespace ACTIVESKINLib; #include <atlbase.h> 2 xxxApp中 CComQIPtr<ISkin> m_pSkin; // A reference to the ActiveSkin's Skin component3 xxxAppp InitInstance() BOOL CMFC_SDIApp::InitInstance() { AfxEnableControlContainer(); m_dlgSkin.Create(IDD_SKINDIALOG); // Tries to create an ActiveSkin control at startup m_pSkin = m_dlgSkin.GetDlgItem(IDC_SKIN)->GetControlUnknown(); if (!m_pSkin) { MessageBox(NULL, "Can't create a Skin control. Make sure ActiveSkin is installed properly.", "Error", MB_ICONERROR | MB_OK); return false; }
// The skin is already built into resources, uncomment this to load another skin at startup m_pSkin->LoadSkin(L"chizh.skn"); // Standard initialization
1 stdafx.h 中
#import "actskin4.ocx" no_implementation raw_interfaces_only raw_native_types
using namespace ACTIVESKINLib;
#include <atlbase.h>
2 xxxApp中 CComQIPtr<ISkin> m_pSkin; // A reference to the ActiveSkin's Skin component3 xxxAppp InitInstance()
BOOL CMFC_SDIApp::InitInstance()
{
AfxEnableControlContainer(); m_dlgSkin.Create(IDD_SKINDIALOG);
// Tries to create an ActiveSkin control at startup
m_pSkin = m_dlgSkin.GetDlgItem(IDC_SKIN)->GetControlUnknown();
if (!m_pSkin)
{
MessageBox(NULL, "Can't create a Skin control. Make sure ActiveSkin is installed properly.", "Error", MB_ICONERROR | MB_OK);
return false;
}
// The skin is already built into resources, uncomment this to load another skin at startup
m_pSkin->LoadSkin(L"chizh.skn"); // Standard initialization
还有按照帮助里的说法,你还得在*。h里添加它的头文件
另外你做的皮肤不要过大,否则回死机的
再就是你参数类型最好改为long