如何更改combbox使用的字体? [英] How do I change the font used by a combbox?

查看:170
本文介绍了如何更改combbox使用的字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的工具栏中嵌入了一些组合框,(即工具栏是他们的父级),但我不喜欢用于在框中显示字符串的字体。使用的字体太粗而且太大。如何更改组合框的字体?我要处理什么消息?

I embedded some comboboxes on to my toolbar,(i.e. the toolbar is their parent) but I don't like the font used to display string in the boxes. The font used is too bold and too large. How can I change the combobox's font? What message do I handle?

推荐答案

也许这个 [ ^ ]或 [ ^ ]链接将有所帮助。
Perhaps this[^] or this [^] link will help.


CFont m_font;
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT));
lf.lfHeight = 15;                  
strcpy(lf.lfFaceName, "Arial");
m_font.CreateFontIndirect(&lf);
combo.SetFont(&m_font, TRUE);


这篇关于如何更改combbox使用的字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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