Share via


Gdi::ScrollDC_I (Windows Embedded CE 6.0)

1/6/2010

This method scrolls a rectangle of bits horizontally and vertically.

Syntax

static WINGDIAPI BOOL WINAPI ScrollDC_I(
  HDC hdc,
  int dx,
  int dy,
  const RECT* lprcScroll,
  const RECT* lprcClip,
  HRGN hrgnUpdate,
  RECT* lprcUpdate
);

Parameters

  • hdc
    [in] Handle to the device context that contains the bits to be scrolled.
  • dx
    [in] Integer that specifies the amount, in device units, of horizontal scrolling.

    This parameter must be a negative value to scroll to the left.

    Only one of the dx and dy parameters can be nonzero.

  • dy
    [in] Integer that specifies the amount, in device units, of vertical scrolling.

    This parameter must be a negative value to scroll up.

    Only one of the dx and dy parameters can be nonzero.

  • lprcScroll
    [in] Long pointer to the RECT structure that contains the coordinates of the scrolling rectangle.

    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.

  • lprcClip
    [in] Pointer to the RECT structure containing the coordinates of the clipping rectangle.

    The only bits that are 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.

  • hrgnUpdate
    [in] Handle to the region uncovered by the scrolling process.

    Gdi::ScrollDC_I defines this region, which is not necessarily a rectangle.

  • lprcUpdate
    [out] Long pointer to the RECT structure that receives the coordinates of the rectangle bounding the scrolling update region.

    This region is the largest rectangular area that requires repainting.

    When the method returns, the values in the structure are in client coordinates, regardless of the mapping mode for the specified device context.

Return Value

Nonzero indicates success.

Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

This method is an internal version of the ScrollDC function.

If lprcUpdate is NULL, the system does not compute the update rectangle.

If hrgnUpdate and lprcUpdate are NULL, the system does not compute the update region.

If hrgnUpdate is not NULL, the system proceeds as though hrgnUpdate contains a valid handle to the region uncovered by the scrolling process, as defined by Gdi::ScrollDC_I.

When you must scroll the entire client area of a window, use the GweBypassCoredllThunk_t::ScrollWindowEx_I method.

Requirements

Header gdi.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Gdi
ScrollDC
GweBypassCoredllThunk_t::ScrollWindowEx_I
RECT