Ermittelt, ob der angegebene Punkt über einem Tab-Control liegt
#include <GuiTab.au3>
_GUICtrlTab_HitTest ( $hWnd, $iX, $iY )
$hWnd | Control-ID / Handle des Controls |
$iX | zu testende X Position |
$iY | zu testende Y Position |
- - - - - - - - Erklärung der Controls - - - - - - - -
#include <GUIConstantsEx.au3>
#include <GuiTab.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Erstellt die GUI
GUICreate("_GUICtrlTab_HitTest (v" & @AutoItVersion & ")", 400, 300)
Local $idTab = GUICtrlCreateTab(2, 2, 396, 296)
GUISetState(@SW_SHOW)
; Fügt Tabs hinzu
_GUICtrlTab_InsertItem($idTab, 0, "Tab 1")
_GUICtrlTab_InsertItem($idTab, 1, "Tab 2")
_GUICtrlTab_InsertItem($idTab, 2, "Tab 3")
; Lagetest
Local $aHit = _GUICtrlTab_HitTest($idTab, 80, 10)
MsgBox($MB_SYSTEMMODAL, "Information", "Der Punkt [80,10] liegt über Tab " & $aHit[0])
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example