How to draw the bitmap icon on title bar when Windows Aero theme is enabled

☆樱花仙子☆ 提交于 2019-12-31 02:56:11

问题


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?

Thanks


回答1:


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

Custom Window Frame Using DWM

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

Vista Goodies in C++: Using Glass in Your UI

Draw custom caption with bitmap in Windows 7/Vista Aero theme



来源:https://stackoverflow.com/questions/34305746/how-to-draw-the-bitmap-icon-on-title-bar-when-windows-aero-theme-is-enabled

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!