comctl32/toolbar: Potential fix for button redraw in TBSTYLE_FLAT toolbars - version 2

Andrew de Quincey adq_dvb at lidskialf.net
Thu Dec 11 19:27:48 CST 2003


On Thursday 11 December 2003 21:32, Andrew de Quincey wrote:
> IDA (yes, that again :), doesn't redraw its toolbar buttons properly. When
> you move the mouse over them, its meant to have a button rollover. Under
> wine however, it highlights the button, but does not de-highlight.
>
> Some investigation shows that these toolbar windows have the TBSTYLE_FLAT
> style.
>
> Some more investigation (with spyxx) showed that under windows, each
> toolbar receives a WM_PAINT message, and, when the mouse leaves a button
> (and it should be de-highlighted), it receives a single WM_ERASEBKGND
> message.
>
> I have concluded that the WM_ERASEBKGND is sent from within WM_PAINT when
> the toolbar detects that the mouse has moved off a button and wants to
> de-highlight it.
>
> Lemme know what you think.. any suggestions greatly appreciated.

However, Dimitrie O. Paun pointed out:

> Calling InvalidateRect() is the right thing to do, we can't just send
> WM_ERASEBKGND messages like so...

This updated patch does as suggested.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-comctl32-toolbar-buttonredraw-2.patch
Type: text/x-diff
Size: 9709 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20031212/869b241f/wine-comctl32-toolbar-buttonredraw-2.bin


More information about the wine-patches mailing list