Function Reference

_GUICtrlSlider_GetChannelRectEx

スライダーのチャンネルの外接長方形のサイズと位置を取得します。

#Include <GuiSlider.au3>
_GUICtrlSlider_GetChannelRect($hWnd)

 

パラメータ

$hWnd コントロールのハンドル

 

返し値

成功: チャンネル座標を受け取った$tagRECT構造体

 

注意

なし。

 

関連

_GUICtrlSlider_GetChannelRect, $tagRECT

 


#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiSlider.au3>

Opt('MustDeclareVars', 1)

$Debug_S = False ; 関数に渡されるClassNameを調べる。動作を確認するにはTrueを設定し、他のコントロールのハンドルを使用

_Main()

Func _Main()
    Local $tRect, $hSlider

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

    ; チャンネル長方形を取得
    $tRect = _GUICtrlSlider_GetChannelRectEx($hSlider)
   
    MsgBox(4160, "Information", StringFormat("[%d][%d][%d][%d]", _
            DllStructGetData($tRect, "Left"), DllStructGetData($tRect, "Top"), _
            DllStructGetData($tRect, "Right"), DllStructGetData($tRect, "Bottom")))

    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main