TBSTYLE_FLAT 和 TBSTYLE_TRANSPARENT

来源:互联网 发布:淘宝网数据分析软件 编辑:程序博客网 时间:2024/06/13 15:10

关于TBSTYLE_FLAT 和 TBSTYLE_TRANSPARENT,MSDN上有云:

TBSTYLE_FLAT 
Version 4.70. Creates a flat toolbar. In a flat toolbar, both the toolbar and the buttons are transparent and hot-tracking is enabled. Button text appears under button bitmaps. To prevent repainting problems, this style should be set before the toolbar control becomes visible.
TBSTYLE_TRANSPARENT 
Version 4.71. Creates a transparent toolbar. In a transparent toolbar, the toolbar is transparent but the buttons are not. Button text appears under button bitmaps. To prevent repainting problems, this style should be set before the toolbar control becomes visible.

看意思应该是使用TBSTYLE_FLAT时toolbar 和 buttons都透明,而使用TBSTYLE_TRANSPARENT时toolbar透明而而buttons不透明,如果这样理解的话,需要toolbar透明而buttons不透明时应该使用TBSTYLE_TRANSPARENT,需要两者都透明的话,则使用TBSTYLE_FLAT,两者同时使用是完全没有必要而且会造成意义模糊的。
但事实是这样的的吗?NO。事实是要创建一个透明的工具条,需要同时使用TBSTYLE_FLATTBSTYLE_TRANSPARENT风格,只用TBSTYLE_FLAT风格创建的toolbar将包含不透明的buttons。这样的话应该是,使用TBSTYLE_FLAT时toolbar 透明而buttons不透明(同MSDN对TBSTYLE_TRANSPARENT的解释),而使用TBSTYLE_TRANSPARENT时应该是toolbar不透明而buttons透明,这样的话两者同时使用达到透明的效果就讲的通了。

但是正确的答案究竟是什么呢?还是不能够确定。:(
原创粉丝点击