User32GetScrollInfo(SafeHandle, ScrollBarOrientation, ScrollInfo) Method

Retrieves the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb).

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", SetLastError = true)]
public static bool GetScrollInfo(
	SafeHandle hWnd,
	ScrollBarOrientation bar,
	ref ScrollInfo refScrollInfo
)

Parameters

hWnd  SafeHandle
A handle to a scroll bar control or a window with a standard scroll bar, depending on the value of the bar parameter.
bar  ScrollBarOrientation
Specifies the type of scroll bar for which to retrieve parameters.
refScrollInfo  ScrollInfo
Pointer to a ScrollInfo structure.

Before calling GetScrollInfo(IntPtr, ScrollBarOrientation, ScrollInfo), set the SizeOfStruct member to Marshal.SizeOf(Of ScrollInfo), and set the Mask member to specify the scroll bar parameters to retrieve.

Before returning, the function copies the specified parameters to the appropriate members of the structure.

Return Value

Boolean
If the function retrieved any values, the return value is

If the function does not retrieve any values, the return value is .

To get extended error information, call GetLastWin32Error.

Remarks

See Also