CMFCRibbonBar和高对比度主题 [英] CMFCRibbonBar and High Contrast theme

查看:348
本文介绍了CMFCRibbonBar和高对比度主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我使用MFC应用程序向导创建一个默认项目,如下所示



  • 应用程序类型:单个文档
  • 项目风格:Office 
  • - Visual样式和颜色:Office 2007
  • 用户界面功能 - 命令栏:使用功能区

并针对Platform Toolset 140进行构建


Windows 10 上运行该应用程序,并从"Windows默认主题"中更改Windows主题。到"高对比度主题" (此示例中的高对比度#1),应用程序的标题栏(最大化,最小化和关闭
按钮...)将无法正常显示,它们全部消失或重复。


<我尝试添加一个兼容性部分

 

< supportedOSId =" {8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" /> 

进入我的应用程序清单


(https://msdn.microsoft.com/en-us/ library / windows / desktop / hh404233(v = vs.85).aspx和https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx) 


标题栏似乎显示正常,但其他地方不是。


在Windows 7上运行应用程序时,我没有看到这种奇怪的行为。  


我错过了什么吗?







解决方案

嗨PCuong,


感谢您在此发帖。


>>在Windows 10上运行该应用程序,并从"Windows默认主题"中更改Windows主题。到"高对比度主题" (此示例中的高对比度#1),应用程序的标题栏(最大化,最小化并关闭
按钮...)将无法正常显示,它们全部消失或重复。


很抱歉,我无法重现您的问题。它在我的VS2015 update3,Win10上工作正常。


你在Win7上创建了这个项目吗?你的vs版本是什么?




我只需按照此文档使用功能区创建一个MFC项目。你可以参考。或者你可以提供一个演示项目,以便我们帮助你找到原因。


https://msdn.microsoft.com/en-us/library/cc309024.aspx


希望这可以提供帮助你最好的问候,


Sera Yu


Hi,

I use MFC Application Wizard to create a default project as below

  • Application Type: Single Document
  • Project Style: Office 
  • - Visual style and colors: Office 2007
  • User Interface Features - Command bars: Use a Ribbon

and build against Platform Toolset 140

Run that application on windows 10 and change the windows theme from "Windows Default Themes" to "High Contrast Themes" (High contrast #1 for this example) , the application's caption bar (maximize, minimize and close button...) will not display properly, they are all disappeared or duplicated.

I tried to add a compatibility section

<supportedOSId="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>

into my application manifest

(https://msdn.microsoft.com/en-us/library/windows/desktop/hh404233(v=vs.85).aspx and https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241(v=vs.85).aspx) 

the Caption Bar seems to display properly but other places are not.

I did not see this odd behavior when run the application on windows 7. 

Did i miss anything ?



解决方案

Hi PCuong,

thanks for posting here.

>>Run that application on windows 10 and change the windows theme from "Windows Default Themes" to "High Contrast Themes" (High contrast #1 for this example) , the application's caption bar (maximize, minimize and close button...) will not display properly, they are all disappeared or duplicated.

Sorry that I can't reproduce your problem. It works fine on my VS2015 update3, Win10.

Did you create this project on Win7? What's your vs version?

I just follow this document and create a MFC project with ribbon. You could refer to. Or could you provide a demo project so that we could help you find the cause.

https://msdn.microsoft.com/en-us/library/cc309024.aspx

Hope this could be help of you.

Best Regards,

Sera Yu


这篇关于CMFCRibbonBar和高对比度主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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