关于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_FLAT 和 TBSTYLE_TRANSPARENT 风格,只用TBSTYLE_FLAT风格创建的 toolbar 将包含不透明的 buttons 。这样的话应该是, 使用 TBSTYLE_FLAT 时toolbar 透明而buttons不透明(同MSDN对 TBSTYLE_TRANSPARENT 的解释),而使用 TBSTYLE_TRANSPARENT 时应该是 toolbar不透明而buttons透明,这样的话两者同时使用达到透明的效果就讲的通了。
-
-
但是正确的答案究竟是什么呢?还是不能够确定。:(