Correctly align background brush when erasing owner drawn bitmaps in wxMSW.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 22 Mar 2011 15:07:20 +0000 (15:07 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 22 Mar 2011 15:07:20 +0000 (15:07 +0000)
commita3b89fa936319c3b40aeeb7772490c18aac74380
tree6b131ec04c526d67ebd12f8e1331781f4ddffd32
parent4c51a665c649f7579fb39e62070cef4f66b3210d
Correctly align background brush when erasing owner drawn bitmaps in wxMSW.

Add a hack to work around the problem with background alignment when drawing
the owner-drawn buttons in wxMSW. This fixes the alignment for any custom
brushes used for background painting but doesn't help with user-defined
EVT_ERASE_BACKGROUND handlers which still don't work well with the owner-drawn
buttons. Unfortunately DrawThemeParentBackground() remains a mystery and I
couldn't understand why not only doesn't it position the DC correctly on its
own but also ignores any attempts to do it manually.

This also doesn't help with the stubbornly remaining one pixel non-transparent
border around non-owner-drawn buttons which I just can't get rid of.

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