我下了个skinmagic,但是说明有点不明白,谁讲一下

机器学习之禅 2009-07-05 11:22:18
说明里面是这么写的,但是这些具体怎么操作呢?
1 将SkinMagicTrial.lib、SkinMagicTrial.dll和SkinMagicLib.h拷贝到项目根目录下,并在工程中添加;
2 把Skins文件夹放在项目根目录下;
3 建立一个MFC单文档项目;
4 将 #include "SkinMagicLib.h" 拷贝到 StdAfx.h文件中;
5 在C**App类中打开InitInstance()函数,在函数其开始部分增加
6 VERIFY( 1 == InitSkinMagicLib( AfxGetInstanceHandle(), _T("ReadUI") ,NULL,NULL ) );
7 VERIFY( 1 == LoadSkinFile("Skins\\corona.smf"));
8 VERIFY( 1 == SetDialogSkin( _T("Dialog") ) );
9 在InitInstance()函数最后,但在以下代码之前,
10 // The one and only window has been initialized, so show and update it.
11 m_pMainWnd->ShowWindow(SW_SHOW);
12 m_pMainWnd->UpdateWindow();
13 加入如下代码
14 VERIFY( 1 == SetWindowSkin(m_pMainWnd->m_hWnd , _T("MainFrame") ) );
15 通过类向导给C**App增加ExitInstance() 函数,内容如下
16 ExitSkinMagicLib();
17 return CWinApp::ExitInstance();
第1行,是把那些放在我建立的程序文件目录下?并且如何添加到工程中?
第9,10行,它说的那段代码我的程序里没有啊?后面贴了我的c**app类的函数,在我的函数里应该怎么添加?
BOOL CHuffmanApp::InitInstance()
{

AfxEnableControlContainer();

// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

CHuffmanDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}

// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.

}
...全文
51 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
机器学习之禅 2009-07-06
  • 打赏
  • 举报
回复
我还是没找到 链接器在哪?也没看到附加依赖项
bragi523 2009-07-06
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 taxuelingbing 的回复:]
还有点不明白,这个什么意思?
然后lib在属性中添加,
[/Quote]
右键点工程属性
然后链接器
在输入中有个附加依赖项添加lib名字进去
机器学习之禅 2009-07-06
  • 打赏
  • 举报
回复
还有点不明白,这个什么意思?
然后lib在属性中添加,
zhlynn 2009-07-06
  • 打赏
  • 举报
回复
试试skinsharp吧。
bragi523 2009-07-05
  • 打赏
  • 举报
回复
[Quote=引用楼主 taxuelingbing 的帖子:]
第1行,是把那些放在我建立的程序文件目录下?并且如何添加到工程中?
[/Quote]
把.h引进来,然后lib在属性中添加,dll放在执行文件目录下
[Quote=引用楼主 taxuelingbing 的帖子:]

第9,10行,它说的那段代码我的程序里没有啊?后面贴了我的c**app类的函数,在我的函数里应该怎么添加?

[/Quote]
舔到最后就好了吧

15,978

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧