启用Windows Aero主题后如何在标题栏上绘制位图图标 [英] How to draw the bitmap icon on title bar when Windows Aero theme is enabled

查看:121
本文介绍了启用Windows Aero主题后如何在标题栏上绘制位图图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发MFC应用程序( DWM库不可用). 我想在标题栏上绘制一个用作按钮的位图. 但是,在Windows 7中启用Aero主题时,位图将不存在(禁用Aero主题时没有问题). 但是我的应用程序仍然可以通过单击位图的位置来做出反应. 有人可以教我如何解决这个问题吗?

I'm developing a MFC application (DWM library is not available). I want to draw a bitmap functioning as a button on the title bar. However, the bitmap won't present when the Aero theme is enabled in Windows 7 (There are no problem when I disable the Aero theme). But my application still reactable by clicking on the position of the bitmap. Does anyone can teach me how to solve this problem?

谢谢

推荐答案

在MSDN上描述了使用DWM将自定义数据绘制到框架区域中的情况,还介绍了点击测试:

Drawing custom data into the frame area with DWM is described on MSDN, also the hit testing is explained there as well:

使用DWM的自定义窗口框架

如果您在CodeProject网站上搜索DWM,则会发现一些有助于您的文章:

If you search for DWM on the CodeProject site you find some articles that will help you:

C ++中的Vista佳作:在用户界面中使用Glass

在Windows 7/Vista Aero主题

这篇关于启用Windows Aero主题后如何在标题栏上绘制位图图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆