对话框换肤
来源:互联网 发布:宝安西乡网络推广公司 编辑:程序博客网 时间:2024/06/02 16:52
在较新版本的BCGControlBar之中增加了对对话框和文档中窗体的form进行换肤。更改了一些控件的显示样式,其中有类似office 2007、office 2010 等等之类的皮肤。下面开始进行换肤,在此先要做好准备,必须安装有BCGControlBar(可以看这里的文章[url]http://blog.csdn.net/akof1314/archive/2010/03/20/5399928.aspx[/url] )
首先:利用BCG向导 建立一个基于对话框的程序,然后删去不需要的文件,如下图所示:
[attach]3328[/attach]
然后,因为我们这次要进行对话框换肤的界面为office 2007蓝色效果 ,所以我们在资源里面导入C:/Program Files/BCGSoft/BCGControlBarPro/BCGCBPro/Styles/BCGPStyle2007Aqua.rc,其他界面再对应加入即可。
接着,在对话框的初始化函数OnInitDialog() 中,加入以下代码
BOOL CThe_Bcg_DialogDlg:: OnInitDialog()
{
CBCGPDialog:: OnInitDialog();
//```````````
CBCGPVisualManager2007:: SetStyle ( CBCGPVisualManager2007:: VS2007_LunaBlue);
CBCGPVisualManager:: SetDefaultManager ( RUNTIME_CLASS ( CBCGPVisualManager2007));
EnableVisualManagerStyle();
return TRUE ; // return TRUE unless you set the focus to a control
}
接着,只要在对话框上放置自己想要的控件即可。下面分别是不同系统上的效果。
Windows 7系统下:
[attach]3330[/attach]
Windows XP系统下:
[attach]3329[/attach]
我们可以看到界面上的一些控件都变掉了,相对好看了些。但是在Windows XP下,标题栏显得特别不协调。如果想要在XP系统下也使标题栏达到换肤的话,请看下一篇《[url=http://blog.csdn.net/akof1314/archive/2010/05/14/5593802.aspx]BCGControlBar MFC对话框换肤(续)[/url] 》
- 对话框换肤
- BCGControlBar MFC对话框换肤
- BCGControlBar MFC对话框换肤
- BCGControlBar MFC对话框换肤
- BCGControlBar MFC对话框换肤(续)
- 用SkinMagic怎样给对话框换肤
- 换肤对话框的选中框。
- mfc 对话框换皮肤
- mfc对话框换背景图片
- 使用SkinMagic工具为对话框换肤的基本方法
- BCGControlBar:为现有MFC对话框工程换肤
- 为已有的MFC对话框程序换肤
- Android实现QQ换头像的对话框
- 换肤
- 换肤
- 换肤
- 换肤手术
- CSS换肤技术
- VC技巧
- LR性能分析图解释
- 积累的VC编程小技巧之树操作
- 树
- BCGControlBar MFC对话框换肤
- 对话框换肤
- 牵引之手
- MTK HISTROY 小结 3
- Android环境搭建常见问题
- 我的学习目标
- framebuffer的理解
- 打鱼还是晒网
- 获取大于等于0的随机数
- android里在程序中修改listView里的内容