如何使用CreateFont()禁用白色文本阴影? [英] How to disable white text shadow using CreateFont()?

查看:81
本文介绍了如何使用CreateFont()禁用白色文本阴影?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要在静态控件中定义所需的字体,我使用CreateFont()函数:

To define the required font in the static control I use the CreateFont() function:

HFONT hNewFont = CreateFont(
16,
0,
0,
0,
FW_DONTCARE,
0,
0,
0,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
//CLIP_DEFAULT_PRECIS,
CLIP_STROKE_PRECIS,
CLEARTYPE_QUALITY,
FF_MODERN | FIXED_PITCH,
"Tahoma");



并将其设置为控制:


and set it for control:

SendMessage(hStatic,WM_SETFONT,(WPARAM)hNewFont,true);



好​​的,它的工作正常。

创建的字体有白色阴影或轮廓,我不知道。

在白色背景上,一切看起来都不错:

< img src =http://s017.radikal.ru/i423/1306/5b/0aaf4cd215c8.png>

,但在黑色背景 - 它是文本中可见的白色阴影:

< img src = http://s019.radikal.ru/i611/1306/cb/221dfed5786e.png\"></img>

那么如何禁用或剪切此白色文字阴影?


Ok, it's works fine.
Created font have white shadow or contour, I don't know.
On a white background everything looks good:
<img src="http://s017.radikal.ru/i423/1306/5b/0aaf4cd215c8.png">
, but on the black background - it is visible white shadow from text:
<img src="http://s019.radikal.ru/i611/1306/cb/221dfed5786e.png"></img>
So how to disable or to cut this white text shadow?

推荐答案

我从未使用过CreateFont函数,但尝试将CLEARTYPE_QUALITY更改为NONANTIALIASED_QUALITY或CreateFont函数中的其他函数



http://msdn.microsoft.com/ en-us / library / windows / desktop / dd183499(v = vs.85).aspx [ ^ ]
I have never used CreateFont function though, but try changing CLEARTYPE_QUALITY to NONANTIALIASED_QUALITY or others in CreateFont Function

http://msdn.microsoft.com/en-us/library/windows/desktop/dd183499(v=vs.85).aspx[^]


这篇关于如何使用CreateFont()禁用白色文本阴影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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