CTabCtrl选项卡背景 [英] CTabCtrl Tab Background

查看:79
本文介绍了CTabCtrl选项卡背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计,



i有一个简单的声音问题,CTabCtrl派生类。

我支持拖放重新排序标签。



现在我的标签背景有问题。

看看这个图像:

http://www.directupload.net/file/d/3693/di4xe5gq_png.htm [<一个href =http://www.directupload.net/file/d/3693/di4xe5gq_png.htmtarget =_ blanktitle =New Window> ^ ]



我搜索过但我找不到任何有用的东西......

我试图在中返回TRUE OnEraseBackground()没有任何事情发生。

然后我试图用红色绘制背景以查看是否有任何事情发生。



任何人都可以帮助我请把这个区域画得透明吗?

我需要这个完全透明的,因为我们的设计决定在这个自由空间中放置一些控件...



谢谢非常适合帮助我!

Hey Guys,

i have a simple sounding problem with a CTabCtrl derived class.
I support Drag and Drop to reorder the Tabs.

Now i have a Problem with the Tab Background.
Look at this image:
http://www.directupload.net/file/d/3693/di4xe5gq_png.htm[^]

I have searched but i don't find anything useful...
I have tried to return TRUE in OnEraseBackground() and nothing happend.
Then i have tried to draw the Background in red to see if anything happens.

Could anyone help me please to draw this area transparent?
I need this completly transparent because our design has decided to place some controls in this free space...

Thank you so much for helping me!

推荐答案

如果您想要绘制背景,您可以自己动手。 Messagehandler OnEraseBackground很好,可以在该函数中执行 CDC :: FillSolidRect(....)。 >


对于某些transpaerency,您应该阅读:使用分层Windows
if you want the background to be painted you got do it yourself. The Messagehandler OnEraseBackground is fine, to do CDC::FillSolidRect(....) in that function

For some transpaerency you should read this: Using Layered Windows


你好 C3D1





  • 为第一个 - Tab控件外部背景在发送给父级的 WM_PRINTCLIENT 消息中被删除
  • 选项卡控件必须具有 WS_CLIPSIBLINGS 样式。
  • 并且应该在选项卡底部设置选项卡控件。控制 SetWindowPos(hTab,HWND_BOTTOM,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE);
Hello C3D1,


  • for the first - the Tab controls outer background is erased in the WM_PRINTCLIENT message sent to the parent window.
  • The tab control must have the WS_CLIPSIBLINGS style.
  • And you should set the tab control at the bottom of the controls by SetWindowPos(hTab,HWND_BOTTOM,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE);.


这篇关于CTabCtrl选项卡背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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