C ++ / MFC日历控件,支持指定字体大小 [英] C++/MFC calendar control with support for specifying font size

查看:262
本文介绍了C ++ / MFC日历控件,支持指定字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道一个好的控件,它会显示一个用于允许交互式日期选择的下拉月份日历? CDateTimeCtrl并没有为我删除它,因为它忽略了(在新的常用控件中,根据MS和我的实验)任何字体规范,选择使用当前的Windows视觉主题信息。



我需要能够使用自定义字体,特别是比普通字体更大的字体。有什么建议吗?

Anyone know of a good control which will display a drop-down month calendar used to allow interactive date selection? CDateTimeCtrl isn''t cutting it for me as it ignores (in the newer common controls, according to MS and from my experimenting) any font specification, opting to instead use the current Windows visual theme info.

I need to be able to have it use a custom font, specifically a larger than normal font. Any suggestions?

推荐答案

可以找到解决方案 here 。内置控件将起作用,但是,从下拉控件中删除视觉主题需要一些代码(因此它尊重字体设置),然后调整控件的大小以匹配自定义字体选择。如果您点击链接,则会提供执行此操作的代码。使用它,我不需要这里请求的自定义控件,因为我可以使用内置控件。
The solution can be found here on Stack Overflow. The built-in control will work, however, some code is required to both remove the visual theme from the drop-down control (so it respects the font setting) and then resize the control to match the custom font choice. The code to do this is provided if you follow the link. Using that, I do not need the custom control requested here as I can use the built-in one.


这篇关于C ++ / MFC日历控件,支持指定字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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