Obtient le rectangle englobant le curseur d'un Slider (tableau)
#include <GuiSlider.au3>
_GUICtrlSlider_GetThumbRect ( $hWnd )
$hWnd | ID/handle du contrôle Slider |
#include <GUIConstantsEx.au3> #include <GuiSlider.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $aRect, $idSlider ; Crée une GUI GUICreate("Slider Get Thumb Rect", 400, 296) $idSlider = GUICtrlCreateSlider(2, 2, 396, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS, $TBS_ENABLESELRANGE)) GUISetState(@SW_SHOW) ; Obtient Thumb Rect $aRect = _GUICtrlSlider_GetThumbRect($idSlider) MsgBox($MB_SYSTEMMODAL, "Information", StringFormat("[%d][%d][%d][%d]", $aRect[0], $aRect[1], $aRect[2], $aRect[3])) ; Boucle jusqu'à ce que l'utilisateur quitte. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example