http://bugs.winehq.org/show_bug.cgi?id=17654
--- Comment #5 from Igor Tarasov tarasov.igor@gmail.com 2009-03-15 18:15:57 --- Created an attachment (id=19976) --> (http://bugs.winehq.org/attachment.cgi?id=19976) cumulative patch for toolbar separators
So, here is the patch. It fixes the following errors:
1. Ignoring setting separator width. 2. Incorrect treating of iBitmap for separators. 3. CCS_VERT toolbars were having horizontal separators. 4. It fixes both problems from this bug.
In details, what was finally found out:
1. When new button is being inserted, iBitmap stands for it's size. This is documented: http://msdn.microsoft.com/en-us/library/bb760476(VS.85).aspx
2. Updating iButton for separator on native comctl get weird results. All buttons located after this separator get their bitmaps uncentered, and sometimes even get out of the button. I suppose that this is not a feature, but a bug. To reproduce, do the following with Control Spy's Toolbar.exe:
MSG (TB_SETBUTTONINFO, 0, TBBUTTONINFO(tbbisize,1,0,0,0,0,0,0,"string",127))
Note: toolbar won't update. Just make it redraw by moving some window over it, or by moving Toolbar.exe window partly out of screen edges and back.
If you send TB_AUTOSIZE, it would put button images to new button locations. This way you can really adjust separator width but only in range from 0 to 14 px. Try playing with second 0 in TBBUTTONINFO structure.
One of my assumptions is that this behavior might be result of running wine. But I don't have Windows box here, so I can't test. If you can, please let me know about the results.
3. Separators flip vertical on CCS_VERT, not on BTNS_DROPDOWN.
4. I wasn't able to make toolbar behave as vertical with builtin comctl. With native just change toolbar's style to CCS_VERT, and you'll see the difference. But it seems to be another bug.
5. Interesting thing: second problem described in the first comment is partly due to incorrect wine + native comctl32 behavoir. In windows you see something like this: http://polosatus.ru/wine/toolbarcombo.png
But wine with native comctl32 displays combobox full toolbar wide and without the dropdown button (see screenshot in first comment). But builtin comctl with this patch displays that toolbar as it should. So, that's the first time I've met native comctl32 behaving wrong.