Function Reference


_GUICtrlSlider_GetChannelRectEx

Retrieves the size and position of the bounding rectangle for a sliders's channel

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

Parameters

$hWnd Control ID/Handle to the control

Return Value

Success: $tagRECT structure that receives the channel coordinates

Remarks

None.

Related

_GUICtrlSlider_GetChannelRect, $tagRECT

Example


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

$Debug_S = False ; Check ClassName being passed to functions, set to True and use a handle to another control to see it work

_Main()

Func _Main()
    Local $tRect, $hSlider

    ; Create GUI
    GUICreate("Slider Get Channel RectEx", 400, 296)
    $hSlider = GUICtrlCreateSlider(2, 2, 396, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS, $TBS_ENABLESELRANGE))
    GUISetState()

    ; Get Channel Rect
    $tRect = _GUICtrlSlider_GetChannelRectEx($hSlider)

    MsgBox(4160, "Information", StringFormat("[%d][%d][%d][%d]", _
            DllStructGetData($tRect, "Left"), DllStructGetData($tRect, "Top"), _
            DllStructGetData($tRect, "Right"), DllStructGetData($tRect, "Bottom")))

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