changeset 1518:bd538277e1e8

Aero Glass fix... instead of trying to draw transparent... use the transparency key as the background color this fixes checboxes/radioboxes and scrolling issues. Seems to have made buttons look better too.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 29 Dec 2011 16:37:40 +0000
parents 6506f29dfefc
children 514b061ac8b2
files win/dw.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/win/dw.c	Thu Dec 29 15:40:42 2011 +0000
+++ b/win/dw.c	Thu Dec 29 16:37:40 2011 +0000
@@ -2732,13 +2732,15 @@
                      if(_dw_composition && (!thiscinfo || (thiscinfo && 
                         (thiscinfo->back == -1 || thiscinfo->back == DW_RGB_TRANSPARENT))))
                      {
-                        SetBkMode((HDC)mp1, TRANSPARENT);
-                        if(thiscinfo && thiscinfo->hbrush)
+                        if(!(msg == WM_CTLCOLORSTATIC && SendMessage((HWND)mp2, STM_GETIMAGE, IMAGE_BITMAP, 0)))
                         {
-                           DeleteObject(thiscinfo->hbrush);
-                           thiscinfo->hbrush = 0;
+                           SetBkColor((HDC)mp1, _dw_transparencykey);
+                           if(thiscinfo->hbrush)
+                              DeleteObject(thiscinfo->hbrush);
+                           thiscinfo->hbrush = CreateSolidBrush(_dw_transparencykey);
+                           SelectObject((HDC)mp1, thiscinfo->hbrush);
+                           return (LONG)thiscinfo->hbrush;
                         }
-                        return (LONG)GetStockObject(NULL_BRUSH);
                      }
                   }
             }