Correct erasing of background behind controls in a toolbar in wxMSW.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 4 Sep 2013 00:14:37 +0000 (00:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 4 Sep 2013 00:14:37 +0000 (00:14 +0000)
commitd9106ec5b679d5c9a5eb61b9633e5f3b1437b6a8
tree18acfcb4c0ab45be7f02b4e9161bf96d204ff437
parentc4e9a71a14863d0a01570c43f11651ab99b01273
Correct erasing of background behind controls in a toolbar in wxMSW.

We need to handle WM_PRINTCLIENT in wxToolBar itself as the default handler
for this message forwards to WM_ERASEBKGND of the parent window and our
handler for that message only erases the client part of the window, in wx
sense, i.e. including a relatively big vertical offset accounting for the
toolbar. This means that when we get WM_PRINTCLIENT from the embedded control
drawing code, we don't erase anything at all as the control rectangle height
is smaller than the offset.

This fix is not perfect as ideally the existing MSWGetBgBrushForChild() should
be taken into account automatically by the default MSWPrintChild()
implementation but at least it fixes the ugly visual artefacts.

Closes #12307.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/msw/toolbar.cpp