Skip to content

Latest commit

 

History

History
144 lines (97 loc) · 5.05 KB

nf-winuser-scrolldc.md

File metadata and controls

144 lines (97 loc) · 5.05 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name req.apiset
NF:winuser.ScrollDC
ScrollDC function (winuser.h)
The ScrollDC function scrolls a rectangle of bits horizontally and vertically.
ScrollDC
ScrollDC function [Windows Controls]
_win32_ScrollDC
_win32_ScrollDC_cpp
controls.ScrollDC
controls._win32_ScrollDC
winuser/ScrollDC
controls\ScrollDC.htm
Controls
VS|Controls|~\controls\scrollbars\scrollbarreference\scrollbarfunctions\scrolldc.htm
12/05/2018
ScrollDC, ScrollDC function [Windows Controls], _win32_ScrollDC, _win32_ScrollDC_cpp, controls.ScrollDC, controls._win32_ScrollDC, winuser/ScrollDC
winuser.h
Windows.h
Windows
Windows Vista [desktop apps only]
Windows Server 2003 [desktop apps only]
User32.lib
User32.dll
Windows
19H1
ScrollDC
winuser/ScrollDC
c++
APIRef
kbSyntax
DllExport
User32.dll
Ext-MS-Win-NTUser-Misc-l1-3-1.dll
Ext-MS-Win-NTUser-Misc-L1-4-0.dll
Ext-Ms-Win-NTUser-Misc-L1-5-0.dll
Ext-MS-Win-NTUser-Misc-L1-5-1.dll
ScrollDC
ext-ms-win-ntuser-misc-l1-5-0 (introduced in Windows 10, version 10.0.10240)

ScrollDC function

-description

The ScrollDC function scrolls a rectangle of bits horizontally and vertically.

-parameters

-param hDC [in]

Type: HDC

Handle to the device context that contains the bits to be scrolled.

-param dx [in]

Type: int

Specifies the amount, in device units, of horizontal scrolling. This parameter must be a negative value to scroll to the left.

-param dy [in]

Type: int

Specifies the amount, in device units, of vertical scrolling. This parameter must be a negative value to scroll up.

-param lprcScroll [in]

Type: const RECT*

Pointer to a RECT structure containing the coordinates of the bits to be scrolled. The only bits affected by the scroll operation are bits in the intersection of this rectangle and the rectangle specified by lprcClip. If lprcScroll is NULL, the entire client area is used.

-param lprcClip [in]

Type: const RECT*

Pointer to a RECT structure containing the coordinates of the clipping rectangle. The only bits that will be painted are the bits that remain inside this rectangle after the scroll operation has been completed. If lprcClip is NULL, the entire client area is used.

-param hrgnUpdate [in]

Type: HRGN

Handle to the region uncovered by the scrolling process. ScrollDC defines this region; it is not necessarily a rectangle.

-param lprcUpdate [out]

Type: LPRECT

Pointer to a RECT structure that receives the coordinates of the rectangle bounding the scrolling update region. This is the largest rectangular area that requires repainting. When the function returns, the values in the structure are in client coordinates, regardless of the mapping mode for the specified device context. This allows applications to use the update region in a call to the InvalidateRgn function, if required.

-returns

Type: BOOL

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

-remarks

If the lprcUpdate parameter is NULL, the system does not compute the update rectangle. If both the hrgnUpdate and lprcUpdate parameters are NULL, the system does not compute the update region. If hrgnUpdate is not NULL, the system proceeds as though it contains a valid handle to the region uncovered by the scrolling process (defined by ScrollDC).

When you must scroll the entire client area of a window, use the ScrollWindowEx function.

-see-also

InvalidateRgn

Other Resources

RECT

Reference

ScrollWindowEx