Author: jimtabor
Date: Fri Oct 26 06:07:33 2007
New Revision: 29893
URL:
http://svn.reactos.org/svn/reactos?rev=29893&view=rev
Log:
ScrollDC From my notes 08/16/2003:
- Wine testing was not enough. If dx & dy are zero and hrgn and lprc are used or not
zero. The Rect for hrgn and lprc are set zero w/o NtUserScrollDC being called. It just
returns TRUE.
- If HDC is zero it will return FALSE and not call NtUserScrollDC.
Modified:
trunk/reactos/dll/win32/user32/windows/paint.c
Modified: trunk/reactos/dll/win32/user32/windows/paint.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/p…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/paint.c (original)
+++ trunk/reactos/dll/win32/user32/windows/paint.c Fri Oct 26 06:07:33 2007
@@ -185,6 +185,16 @@
ScrollDC(HDC hDC, int dx, int dy, CONST RECT *lprcScroll, CONST RECT *lprcClip,
HRGN hrgnUpdate, LPRECT lprcUpdate)
{
+ if (hDC == NULL) return FALSE;
+
+ if (dx == 0 && dy == 0)
+ {
+ if (hrgnUpdate) SetRectRgn(hrgnUpdate, 0, 0, 0, 0);
+ if (lprcUpdate) lprcUpdate->left = lprcUpdate->right =
+ lprcUpdate->top = lprcUpdate->bottom = 0;
+ return TRUE;
+ }
+
return NtUserScrollDC(hDC, dx, dy, lprcScroll, lprcClip, hrgnUpdate,
lprcUpdate);
}