Retrieves the size and position of the bounding rectangle for the slider
#include <GuiSlider.au3>
_GUICtrlSlider_GetThumbRect ( $hWnd )
$hWnd | Control ID/Handle to the control |
#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