# Function Reference

# _GUICtrlSlider_GetThumbRect

Retrieves the size and position of the bounding rectangle for the slider

#include <GuiSlider.au3>
_GUICtrlSlider_GetThumbRect ( $hWnd )

## Parameters

$hWnd | Control ID/Handle to the control

## Return Value

Returns an array in the following format:
[0] - X coordinate of the upper left corner of the rectangle
[1] - Y coordinate of the upper left corner of the rectangle
[2] - X coordinate of the lower right corner of the rectangle
[3] - Y coordinate of the lower right corner of the rectangle

## Related

_GUICtrlSlider_GetThumbRectEx

## Example

    #include <GUIConstantsEx.au3>
    #include <GuiSlider.au3>
    #include <MsgBoxConstants.au3>

    Example()

    Func Example()
        Local $aRect, $idSlider

        ; Create GUI
        GUICreate("Slider Get Thumb Rect", 400, 296)
        $idSlider = GUICtrlCreateSlider(2, 2, 396, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS, $TBS_ENABLESELRANGE))
        GUISetState(@SW_SHOW)

        ; Get Thumb Rect
        $aRect = _GUICtrlSlider_GetThumbRect($idSlider)

        MsgBox($MB_SYSTEMMODAL, "Information", StringFormat("[%d][%d][%d][%d]", $aRect[0], $aRect[1], $aRect[2], $aRect[3]))

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
    EndFunc   ;==>Example