2 * Scroll windows and DCs
4 * Copyright David W. Metcalfe, 1993
5 * Alex Korobka 1995,1996
14 #include "wine/winuser16.h"
17 #include "debugtools.h"
19 DEFAULT_DEBUG_CHANNEL(scroll);
21 /*************************************************************************
22 * ScrollWindow (USER32.@)
25 BOOL WINAPI ScrollWindow( HWND hwnd, INT dx, INT dy,
26 const RECT *rect, const RECT *clipRect )
29 (ERROR != ScrollWindowEx( hwnd, dx, dy, rect, clipRect, 0, NULL,
30 (rect ? 0 : SW_SCROLLCHILDREN) |
34 /*************************************************************************
37 BOOL16 WINAPI ScrollDC16( HDC16 hdc, INT16 dx, INT16 dy, const RECT16 *rect,
38 const RECT16 *cliprc, HRGN16 hrgnUpdate,
41 RECT rect32, clipRect32, rcUpdate32;
44 if (rect) CONV_RECT16TO32( rect, &rect32 );
45 if (cliprc) CONV_RECT16TO32( cliprc, &clipRect32 );
46 ret = ScrollDC( hdc, dx, dy, rect ? &rect32 : NULL,
47 cliprc ? &clipRect32 : NULL, hrgnUpdate, &rcUpdate32 );
48 if (rcUpdate) CONV_RECT32TO16( &rcUpdate32, rcUpdate );
53 /*************************************************************************
56 * Only the hrgnUpdate is return in device coordinate.
57 * rcUpdate must be returned in logical coordinate to comply with win API.
60 BOOL WINAPI ScrollDC( HDC hdc, INT dx, INT dy, const RECT *rc,
61 const RECT *prLClip, HRGN hrgnUpdate,
64 if (USER_Driver.pScrollDC)
65 return USER_Driver.pScrollDC( hdc, dx, dy, rc, prLClip, hrgnUpdate, rcUpdate );
70 /*************************************************************************
71 * ScrollWindowEx (USER32.@)
73 * NOTE: Use this function instead of ScrollWindow32
75 INT WINAPI ScrollWindowEx( HWND hwnd, INT dx, INT dy,
76 const RECT *rect, const RECT *clipRect,
77 HRGN hrgnUpdate, LPRECT rcUpdate,
80 if (USER_Driver.pScrollWindowEx)
81 return USER_Driver.pScrollWindowEx( hwnd, dx, dy, rect, clipRect,
82 hrgnUpdate, rcUpdate, flags );