# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1325130411 0 # Node ID f33dca7369176089d47dec50d8203aacfc86099f # Parent def1ca619ba28cb9ab9baae82539e3fb73f7174b More work on Windows Aero Glass backgrounds... needs more work but slowly getting there. diff -r def1ca619ba2 -r f33dca736917 win/dw.c --- a/win/dw.c Thu Dec 29 01:53:59 2011 +0000 +++ b/win/dw.c Thu Dec 29 03:46:51 2011 +0000 @@ -2264,7 +2264,6 @@ return (LONG)thiscinfo->hbrush; } } - } break; } @@ -2298,16 +2297,6 @@ case WM_MOUSEMOVE: _wndproc(hWnd, msg, mp1, mp2); break; -#if 0 - case WM_ERASEBKGND: - { - ColorInfo *thiscinfo = (ColorInfo *)GetWindowLongPtr(hWnd, GWLP_USERDATA); - - if(thiscinfo && thiscinfo->fore != -1 && thiscinfo->back != -1) - return FALSE; - } - break; -#endif case WM_PAINT: { ColorInfo *thiscinfo = (ColorInfo *)GetWindowLongPtr(hWnd, GWLP_USERDATA); @@ -2755,7 +2744,27 @@ return (LONG)thiscinfo->hbrush; } } - } + #ifdef AEROGLASS + switch(msg) + { + case WM_CTLCOLORSTATIC: + case WM_CTLCOLORBTN: + case WM_CTLCOLORDLG: + { + if(thiscinfo && (thiscinfo->fore == -1 || thiscinfo->fore == DW_CLR_DEFAULT)) + SetTextColor((HDC)mp1, RGB(128,128,128)); + if(thiscinfo && (thiscinfo->back == -1 || thiscinfo->back == DW_RGB_TRANSPARENT)) + { + SetBkMode((HDC)mp1, TRANSPARENT); + if(thiscinfo->hbrush) + DeleteObject(thiscinfo->hbrush); + thiscinfo->hbrush = 0; + return (LONG)GetStockObject(NULL_BRUSH); + } + } + } +#endif + } break; } }