https://git.reactos.org/?p=reactos.git;a=commitdiff;h=75a80ec82309a19632251b...
commit 75a80ec82309a19632251bfe6aa9e7f14132a86f Author: Giannis Adamopoulos gadamopoulos@reactos.org AuthorDate: Thu Jan 10 23:35:56 2019 +0200 Commit: Giannis Adamopoulos gadamopoulos@reactos.org CommitDate: Thu Jan 10 23:38:02 2019 +0200
[COMCTL32] button: Don't erase the area of the checkbox or the text. Attempt to fix the menace of the world, CORE-13278. Note that this can also cause visual glitches for classic check boxes or radio buttons. --- dll/win32/comctl32/button.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dll/win32/comctl32/button.c b/dll/win32/comctl32/button.c index 59067471f1..602a37c7a7 100644 --- a/dll/win32/comctl32/button.c +++ b/dll/win32/comctl32/button.c @@ -1550,7 +1550,9 @@ static void CB_Paint( const BUTTON_INFO *infoPtr, HDC hDC, UINT action )
/* Since WM_ERASEBKGND does nothing, first prepare background */ if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush ); +#ifndef __REACTOS__ if (action == ODA_DRAWENTIRE) FillRect( hDC, &client, hBrush ); +#endif
/* Draw label */ client = rtext; @@ -1616,6 +1618,15 @@ static void CB_Paint( const BUTTON_INFO *infoPtr, HDC hDC, UINT action ) if (action == ODA_DRAWENTIRE) BUTTON_DrawLabel(infoPtr, hDC, dtFlags, &rtext);
+#ifdef __REACTOS__ + if (action == ODA_DRAWENTIRE) + { + ExcludeClipRect(hDC, rbox.left, rbox.top, rbox.right, rbox.bottom); + ExcludeClipRect(hDC, rtext.left, rtext.top + 1, rtext.right, rtext.bottom - 1); + FillRect( hDC, &client, hBrush ); + } +#endif + /* ... and focus */ if (action == ODA_FOCUS || (state & BST_FOCUS)) {