http://bugs.winehq.org/show_bug.cgi?id=17654
--- Comment #4 from Igor Tarasov tarasov.igor@gmail.com 2009-03-13 13:56:47 --- Here are more results:
After some controlspy testing I can say that I was not able to reproduce expected behavior on native comctl. That is, wine now does it all wrong.
As I've told, wine thinks that there is some kind of not documented feature (see above) that when you set bitmap index for separator on a toolbar it affects separator's width. But this just does not work with native comctl32!
To see this, all you have to do is to open Toolbar.exe and send the following: MSG (TB_SETBUTTONINFO, 0, TBBUTTONINFO(tbbisize, TBIF_STYLE | TBIF_IMAGE,0,40,0,1,0,0,"string",127))
If we agree with asumption that there is such undocumented feature, button with id = 0 should be converted into separator with 40 px width. But, this just does not happen! That is button does change into separator, but it has default width. I've been testing it out a lot with various values, creting/recreating buttons etc. But native comctl32 has NEVER changed separator width based on bitmap index.
On the other hand, it does respond very well when you change button's size: MSG (TB_SETBUTTONINFO, 0, TBBUTTONINFO(tbbisize, TBIF_STYLE | TBIF_SIZE,0,0,0,1,40,0,"string",127))
But builtin comctl32 does everything inside out: it ignores TBIF_SIZE and responds to TBIF_IMAGE.
And just now I've found this MSDN article: http://msdn.microsoft.com/en-us/library/477kf668(VS.80).aspx
It's an MFC refernce for CToolBar::SetButtonInfo. And there you can find the following remark: "For separators, which have the style TBBS_SEPARATOR, this function sets the separator's width in pixels to the value stored in iImage."
So, this is not WinAPI undocumented feature. I suppose that somebody have just confused APIs.