从VS2010迁移到VS2012后,为什么MFC对话框显示旧的字体样式? [英] Why MFC dialogs are showing old font style after migrated from VS2010 to VS2012 ?

查看:111
本文介绍了从VS2010迁移到VS2012后,为什么MFC对话框显示旧的字体样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的代码来修复字体问题,但它仅适用于VS2010而不适用于VS2012。

I have used below code to fix the font issue, but its working only for VS2010 not for VS2012.

#pragmacomment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\")




推荐答案

您好Srikanth.tech,

Hi Srikanth.tech,

感谢您在此发帖。

在我看来,你可以使用
SetFont() 
来使对话框使用指定的字体。或者创建自己的对话框模板并使用
CreateIndirect
来创建一个来自内存中对话框模板的无模式对话框。

In my opinion, you could use SetFont() to make the dialog to use the specified font. Or create your own dialog template and use CreateIndirect to create a modeless dialog box from a dialog-box template in memory.

以下是您可以参考的示例。

Here is a sample you could refer to.

http://www.codeguru.com/cpp/wd/dislog/fonthandling /article.php/c2023/Change-default-dialog-font.htm

希望这可以帮到你。

最诚挚的问候,你好b $ b Sera Yu

Best Regards,
Sera Yu


这篇关于从VS2010迁移到VS2012后,为什么MFC对话框显示旧的字体样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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