有没有发现有好多软件,界面美得让人吐血;对于有些平台制作一个好的ui也很easy,但是用vc来做,我宁可
不做软件:做一个不规则的按钮就要派生一个类,并且写一大堆代码。。。
几经周折,我找到了appface,用了她会让人爱不释手的。下面我说一下用他的理由:
1,打造界面简单:比如做对话框,只需在domodal前调用一个SkinStart和其后调用一个SkinRemove;
另外还要把appface。lib添到links里,再include“appface。h ".
2,发行简单,只需把appface。dll和appfacebind打包一起发行(两个文件才200k),当然这是说皮肤文件在
资源里加载;
3,如果你不满足于里边自带的20多个皮肤风格的话,可以自己制作。制作过程也超简单:提供了皮肤制作工具
制作过程中只需修改相应的属性即可,例如按钮位图,控件背景等;
这是一个皮肤文件的效果截图:
你看亮不亮,,,
下面就举个例子:
这是我创建的app wizard模板:
注意有序列号哦,记住了你就可以免费使用了,哈哈,
BOOL CSkinApp::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.
SkinStart(MAKEINTRESOURCE(IDR_URF1),WINDOW_TYPE_VC,"RQPJNW0N0V2QRMAP1KXVBHHDUVVQGUXR",GTP_LOAD_RESOURCE,NULL,_T("URF"));
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CSkinDlg 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
}
SkinRemove();
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
看一下同样一个domodal的效果:
评论