Fix toolbar get style
Ge van Geldorp
gvg at reactos.com
Fri Apr 30 04:28:27 CDT 2004
> From: Maxime Bellengé
>
> When a toolbar receives a TB_GETSTYLE message with wParam=0,
> the application expects to get the toolbar style and not the
> first button style. This patch fixes eMule 0.42e, now the
> toolbar is visible.
>
> ChangeLog
> * Fix TB_GETSTYLE to return the style of the toolbar when
> wParam is 0
It seems there is another problem with the toolbar styles. When you CreateToolbarEx() with the WS_VISIBLE bit turned on, TOOLBAR_Create() will call GetWindowLongW() to get the window style and store that as the dwStyle member of TOOLBAR_INFO. Unfortunately, when the WM_CREATE message is sent the WS_VISIBLE bit of the window style retrieved with GetWindowLongW() is always turned off. It is turned on a little bit later, but no WS_STYLECHANGED is sent for this. So, the dwStyle member of TOOLBAR_INFO doesn't always mimick the "true" window style, it is possible that the WS_VISIBLE bit is off in TOOLBAR_INFO but on in the window style. If your app does something like:
SendMessage(hwndTB, TB_SETSTYLE, 0,
SendMessage(hwndTB, TB_GETSTYLE, 0, 0) | TBSTYLE_FLAT );
this will make your toolbar invisible.
Gé van Geldorp.
More information about the wine-devel
mailing list