静态文本可不可以不用背景色,直接显示在背 Topic is solved

这是wxWidgets论坛的中文版本。在这里,您可以用您的母语汉语讨论上面任一子论坛所涉及的所有关于wxWidgets的话题。欢迎大家参与到对有价值的帖子的中英互译工作中来!
Post Reply
swallow
Earned a small fee
Earned a small fee
Posts: 20
Joined: Thu Jun 19, 2008 12:57 pm

静态文本可不可以不用背景色,直接显示在背

Post by swallow » Wed Jul 02, 2008 12:54 pm

静态文本可不可以不用背景色,直接显示在背景图片上?窗口背景是一张图片,上面有按钮和静态文本,静态文本可不可以只显示文字,不要他自己的背景色边框?

kevin_fly
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 15, 2008 12:55 am
Contact:

Post by kevin_fly » Thu Jul 03, 2008 1:51 am

自己重载一下wxTextCtrl,在OnPaint中贴图就可以了
http://blog.163.com/kevin_fly/
-----我的博客,我的知识库------

swallow
Earned a small fee
Earned a small fee
Posts: 20
Joined: Thu Jun 19, 2008 12:57 pm

Post by swallow » Thu Jul 03, 2008 1:53 pm

我必须在大背景上截出一块矩型区域图片作为文字背景图片,实现这种效果,我现在不想截图,想直接写文字,却怎么也实现不了,绘制透明背景也不行,它默认有个灰色的底框,我不帖背景图或贴透明图它就是灰色底框,不能透过去显示大背景。

bloodlee
Experienced Solver
Experienced Solver
Posts: 77
Joined: Thu Nov 30, 2006 10:49 am
Location: Shenzhen, CHN

Post by bloodlee » Tue Jul 08, 2008 8:42 am

换个思路呢, 直接在背景上写字,不用wxStaticText. 就是MS Layout会有问题. :)

swallow
Earned a small fee
Earned a small fee
Posts: 20
Joined: Thu Jun 19, 2008 12:57 pm

Post by swallow » Mon Jul 14, 2008 4:56 am

bloodlee,怎么不用wxStaticText直接在背景上写字呢?

bloodlee
Experienced Solver
Experienced Solver
Posts: 77
Joined: Thu Nov 30, 2006 10:49 am
Location: Shenzhen, CHN

Post by bloodlee » Mon Jul 21, 2008 7:09 am

Sorry for delay.

我的意思就是直接通过DC去写字, 而不是通过控件.
这样一来, Layout就会有问题了.

只是说说, :)

Post Reply