Author: jimtabor Date: Thu Dec 6 01:30:44 2007 New Revision: 31031
URL: http://svn.reactos.org/svn/reactos?rev=31031&view=rev Log: Fix one wine test, from 75 to 23 no.
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c Thu Dec 6 01:30:44 2007 @@ -108,7 +108,17 @@ HDC STDCALL NtUserGetDC(HWND hWnd) { - return NtUserGetDCEx(hWnd, NULL, NULL == hWnd ? DCX_CACHE | DCX_WINDOW : DCX_USESTYLE); + if (!hWnd) + { // MSDN: + //"hWnd [in] Handle to the window whose DC is to be retrieved. + // If this value is NULL, GetDC retrieves the DC for the entire screen." + hWnd = IntGetDesktopWindow(); + if (hWnd) + return NtUserGetDCEx(hWnd, NULL, DCX_CACHE | DCX_WINDOW); + else + return NULL; + } + return NtUserGetDCEx(hWnd, NULL, DCX_USESTYLE); }
PDCE FASTCALL