# Function Reference

# _GUICtrlSlider_GetLogicalTics

Retrieves an array that contains the logical positions of the tick marks for a slider

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

## Parameters

$hWnd | Control ID/Handle to the control

## Return Value

Success: | an array of logical positions.
Failure: | sets the @error flag to non-zero.

## Remarks

The number of elements in the array is two less than the tick count returned by the _GUICtrlSlider_GetNumTics() function.
Note that the values in the array may include duplicate positions and may not be in sequential order.
The data in the returned array is valid until you change the slider's tick marks.
The elements of the array specify the logical positions of the sliders's tick marks, not including the first and last tick marks created by the slider.
The logical positions can be any of the integer values in the sliders's range of minimum to maximum slider positions.

## Example

    #include "Extras\HelpFileInternals.au3"

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

    Example()

    Func Example()
        Local $idSlider, $aTics

        ; Create GUI
        GUICreate("Slider Get Logical Tic Positions", 400, 296)
        $idSlider = GUICtrlCreateSlider(2, 2, 300, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS))
        _MemoCreate(2, 32, 396, 266, $WS_VSCROLL)
        GUISetState(@SW_SHOW)

        $aTics = _GUICtrlSlider_GetLogicalTics($idSlider)
        _MemoWrite("Number Tics Excluding 1st and last .....: " & UBound($aTics))
        For $x = 0 To UBound($aTics) - 1
            _MemoWrite(StringFormat("(%02d) Logical Tick Position .............: %d", $x, $aTics[$x]))
        Next

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