Author: jimtabor Date: Tue Dec 4 01:03:26 2007 New Revision: 30989
URL: http://svn.reactos.org/svn/reactos?rev=30989&view=rev Log: Fix dce test. User32 wine test 57 pass and only 2 fail.
Modified: trunk/reactos/dll/win32/user32/windows/nonclient.c
Modified: trunk/reactos/dll/win32/user32/windows/nonclient.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/no... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/nonclient.c (original) +++ trunk/reactos/dll/win32/user32/windows/nonclient.c Tue Dec 4 01:03:26 2007 @@ -258,7 +258,15 @@ UserDrawCaptionButton(&WindowRect, Style, ExStyle, hDC, bDown, Type); }
+// Note from Wine: +/* MSDN docs are pretty idiotic here, they say app CAN use clipRgn in + the call to GetDCEx implying that it is allowed not to use it either. + However, the suggested GetDCEx( , DCX_WINDOW | DCX_INTERSECTRGN) + will cause clipRgn to be deleted after ReleaseDC(). + Now, how is the "system" supposed to tell what happened? + */ #define DCX_USESTYLE 0x00010000 +#define DCX_KEEPCLIPRGN 0x00040000 // <-- You do this! /* * FIXME: * - Drawing of WS_BORDER after scrollbars @@ -277,7 +285,7 @@
Style = GetWindowLongW(hWnd, GWL_STYLE);
- hDC = GetDCEx(hWnd, hRgn, DCX_WINDOW | DCX_INTERSECTRGN | DCX_USESTYLE); + hDC = GetDCEx(hWnd, hRgn, DCX_WINDOW | DCX_INTERSECTRGN | DCX_USESTYLE | DCX_KEEPCLIPRGN); if (hDC == 0) { return 0;