---
name: "GetScrollPos"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/GetScrollPos"
---

# GetScrollPos(3w)

## NAME

**GetScrollPos** (USER32.@)

## SYNOPSIS

INT GetScrollPos\
  (\
   HWND *hwnd*,\
   INT  *nBar*\
  )

## DESCRIPTION

Gets the current position of the scroll thumb.

## PARAMS

*hwnd* **\[In\]**  Handle of window with scrollbar(s).

*nBar* **\[In\]**  One of **SB\_HORZ**, **SB\_VERT**, or **SB\_CTL**.

## RETURNS

**Success:** Current position

**Failure:** **0.**

## REMARKS

There is ambiguity when **0** is returned. Use GetLastError to make sure there was an error (and to know which one).

## IMPLEMENTATION

Declared in **"commctrl.h"**.

Implemented in **"dlls/user32/scroll.c"**.

Debug channel **"scroll"**.
