Mercurial > dwindows
changeset 1514:f33dca736917
More work on Windows Aero Glass backgrounds...
needs more work but slowly getting there.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 29 Dec 2011 03:46:51 +0000 |
parents | def1ca619ba2 |
children | a26edf086082 |
files | win/dw.c |
diffstat | 1 files changed, 21 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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; } }