[Win32SS]

- Based on wine Alexandre Julliard: ScrollWindow should not use a cached DC, unlike ScrollWindowEx.

svn path=/trunk/; revision=57290
This commit is contained in:
James Tabor
2012-09-13 01:22:33 +00:00
parent d96bde2a80
commit eb33840de6
2 changed files with 27 additions and 2 deletions
+20 -1
View File
@@ -1613,6 +1613,7 @@ NtUserScrollWindowEx(
HDC hDC;
HRGN hrgnOwn = NULL, hrgnTemp;
HWND hwndCaret;
DWORD dcxflags = 0;
NTSTATUS Status = STATUS_SUCCESS;
DECLARE_RETURN(DWORD);
USER_REFERENCE_ENTRY Ref, CaretRef;
@@ -1669,7 +1670,25 @@ NtUserScrollWindowEx(
else
hrgnOwn = IntSysCreateRectRgn(0, 0, 0, 0);
hDC = UserGetDCEx(Window, 0, DCX_CACHE | DCX_USESTYLE);
/* ScrollWindow uses the window DC, ScrollWindowEx doesn't */
if (flags & SW_SCROLLWNDDCE)
{
dcxflags = DCX_USESTYLE;
if (!(Window->pcls->style & (CS_OWNDC|CS_CLASSDC)))
dcxflags |= DCX_CACHE; // AH??? wine~ If not Powned or with Class go Cheap!
if (flags & SW_SCROLLCHILDREN && Window->style & WS_CLIPCHILDREN)
dcxflags |= DCX_CACHE|DCX_NOCLIPCHILDREN;
}
else
{
/* So in this case ScrollWindowEx uses Cache DC. */
dcxflags = DCX_CACHE|DCX_USESTYLE;
if (flags & SW_SCROLLCHILDREN) dcxflags |= DCX_NOCLIPCHILDREN;
}
hDC = UserGetDCEx(Window, 0, dcxflags);
if (!hDC)
{
/* FIXME: SetLastError? */
+7 -1
View File
@@ -1900,9 +1900,10 @@ ScrollWindow(HWND hWnd,
prcClip,
0,
NULL,
(lpRect ? 0 : SW_SCROLLCHILDREN) | SW_INVALIDATE) != ERROR;
(lpRect ? 0 : SW_SCROLLCHILDREN) | (SW_ERASE|SW_INVALIDATE|SW_SCROLLWNDDCE)) != ERROR;
}
/* ScrollWindow uses the window DC, ScrollWindowEx doesn't */
/*
* @implemented
@@ -1917,6 +1918,11 @@ ScrollWindowEx(HWND hWnd,
LPRECT prcUpdate,
UINT flags)
{
if (flags & SW_SMOOTHSCROLL)
{
FIXME("SW_SMOOTHSCROLL not supported.");
// Fall through....
}
return NtUserScrollWindowEx(hWnd,
dx,
dy,