VC++中启用XP主题外观
来源:互联网 发布:淘宝手机端首页红包 编辑:程序博客网 时间:2024/05/15 11:15
.NET Winform中,启用XP主题外观执行以下语句即可:
Application.EnableVisualStyles();
VC Win32项目,默认是不启用XP主题外观的,并不是每个人都喜欢简洁的Windows经典主题外观。
启用XP主题外观,需要用资源文件。有种更简单的方式:
头文件里加入以下语句:
#include <CommCtrl.h>
#pragma comment(lib, "ComCtl32.Lib")
#pragma comment(linker, "/manifestdependency:/"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'/"")
#pragma comment(lib, "ComCtl32.Lib")
#pragma comment(linker, "/manifestdependency:/"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'/"")
在main函数最前面调用InitCommonControls函数:
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
InitCommonControls();
MessageBox(NULL, L"Windows XP theme was enabled.", L"http://www.xianfen.net", 0 );
return 0;
}
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
InitCommonControls();
MessageBox(NULL, L"Windows XP theme was enabled.", L"http://www.xianfen.net", 0 );
return 0;
}
运行程序已经启用了XP主题外观,如图:
http://www.cnblogs.com/zxjay/archive/2009/06/17/1505255.html
- VC++中启用XP主题外观
- XP主题是否启用!
- VB6:让IE控件支持XP主题外观!
- IE中XP主题的滚动条
- 在浏览器插件中使用xp主题
- 【桌面主题】杯中恬静xp主题
- 在VC++中启用内存泄露检测
- VC中启用WINRAR压缩文件的方法
- 主题与外观(skins)
- 主题和外观
- 母版页,主题,外观
- NetBeans更换外观主题
- 在Linux中虚拟机中安装的XP启用DirectX3D
- 如何在 Windows XP 中启用自动登录
- 【热门主题:麦蒂xp主题】
- 在vc中如何自定义AfxMessgeBox的系统窗口外观
- VC2008中为你的程序添加XP主题风格
- vc中实现xp风格界面
- java操作xml运行速度慢?为什么呢?
- 无线抄表火热,ZigBee暂输于专用协议[转]
- 【题目14】求两个字符串的最大相同字串
- Oracle中,用一条Sql实现任意的行转列拼接(不是decode)
- JS弹出居中的DIV的代码
- VC++中启用XP主题外观
- js alert乱码
- Automation for the people: Continuous Integration anti-patterns Part 1
- Fierce Domain Scanner
- 用sp_change_users_login消除Sql Server的孤立用户
- 博客要搬家了!!!!
- JavaScript判断输入是否为正整数、浮点数等数字的函数
- DELPHI面向对象参考
- Automation for the people: Continuous Integration anti-patterns, Part 2