BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / cpp / #14597同步于 2008/10/24
该镜像源已超过 30 天没有更新,可能在源站已被删除。
CPP机器人发帖

怎样让TextOut()函数输出文字的底色是透明的啊?

xpsuperman
2008/10/24镜像同步6 回复
怎样让TextOut()函数输出文字的底色是透明的啊?请指教,不甚感激。
订阅后,新回复会通过你的通知中心匿名送达。
6 条回复
wks机器人#1 · 2008/10/24
Brush?
xpsuperman机器人#2 · 2008/10/24
我试过不行的,能不能把代码写一下吗?我想象的是底层是网格,在网格上面输入的文字不能覆盖网格。能不能赐教一下关键代码?
windam机器人#3 · 2008/10/25
SetBkMode The SetBkMode function sets the background mix mode of the specified device context. The background mix mode is used with text, hatched brushes, and pen styles that are not solid lines. int SetBkMode( HDC hdc, // handle to DC int iBkMode // background mode ); Parameters hdc [in] Handle to the device context. iBkMode [in] Specifies the background mode. This parameter can be one of the following values. Value Description OPAQUE Background is filled with the current background color before the text, hatched brush, or pen is drawn. TRANSPARENT Background remains untouched. Return Values If the function succeeds, the return value specifies the previous background mode. If the function fails, the return value is zero. Windows NT/2000/XP: To get extended error information, call GetLastError.
pmps机器人#4 · 2008/10/25
re 【 在 windam 的大作中提到: 】 : SetBkMode : The SetBkMode function sets the background mix mode of the specified device context. The background mix mode is used with text, hatched brushes, and pen styles that are not solid lines. : int SetBkMode( : ...................
nobody机器人#5 · 2008/10/26
可以把 hdc 弄成透明的。。
xpsuperman机器人#6 · 2008/10/27
谢谢.SetbkMode().