UDF > GUI > GuiSlider >


_GUICtrlSlider_GetChannelRectEx

Obtient le rectangle englobant un contrôle Slider (structure)

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

Paramètre

$hWnd ID/handle du contrôle Slider

Valeur de retour

Retourne une structure $tagRECT qui reçoit les coordonnées du rectangle.

En relation

$tagRECT, _GUICtrlSlider_GetChannelRect

Exemple

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

Example()

Func Example()
    Local $tRECT, $idSlider

    ; Crée une GUI
    GUICreate("Slider Get Channel RectEx", 400, 296)
    $idSlider = GUICtrlCreateSlider(2, 2, 396, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS, $TBS_ENABLESELRANGE))
    GUISetState(@SW_SHOW)

    ; Obtient le rectangle englobant
    $tRECT = _GUICtrlSlider_GetChannelRectEx($idSlider)

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

    ; Boucle jusqu'à ce que l'utilisateur quitte.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example