[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'InterfaceBase' (#lcl)

# TWidgetSet.ScrollWindowEx

Scrolls the content of a window, by a number of pixels.

## Declaration

Source position: winapih.inc line 233

`public function TWidgetSet.ScrollWindowEx(`
`hWnd: HWND;`
`dx: Integer;`
`dy: Integer;`
`prcScroll: PRect;`
`prcClip: PRect;`
`hrgnUpdate: HRGN;`
`prcUpdate: PRect;`
`flags: UINT`
`):Boolean; virtual;`

## Arguments

`hWnd` |  | The window handle.
`dx` |  | Horizontal distance (positive to scroll right).
`dy` |  | Vertical distance (positive to scroll down).
`prcScroll` |  | The part of the window, that is to be scrolled. Nil means the entire client area.
`prcClip` |  | Pixels falling outside this rectangle are lost. Nil means the entire client area.
`hrgnUpdate` |  | The invalidated parts of the window are added to this region (can be zero).
`prcUpdate` |  | Receives the boundary of the invalidated part of the window (can be Nil).
`flags` |  | Control flags.

## Function result

False on failure.

## Description

The following flags values are defined:

SW_ERASE
  When used with SW_INVALIDATE, sends WM_ERASEBKGND messages for the invalidated parts of the window.
SW_INVALIDATE
  Invalidates the resulting hrgnUpdate region.
SW_SCROLLCHILDREN
  Also scrolls child windows within the scroll rect. Beware: also scrolls parts of the child windows!
SW_SMOOTHSCROLL
  set HIWORD of flags to the time for the scrolling operation.