Ermittelt das begrenzende Rechteck für einen Tab
#include <GuiTab.au3>
_GUICtrlTab_GetItemRectEx ( $hWnd, $iIndex )
$hWnd | Control-ID / Handle des Controls |
$iIndex | 0-basierender Itemindex |
- - - - - - - - Erklärung der Controls - - - - - - - -
$tagRECT, _GUICtrlTab_GetItemRect
#include <GUIConstantsEx.au3>
#include <GuiTab.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Erstellt eine GUI
GUICreate("Tab-Control: Ermittelt das Item RectEx (v" & @AutoItVersion & ")", 500, 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")
; Ermittelt das Rechteck von Item 0
Local $tRECT = _GUICtrlTab_GetItemRectEx($idTab, 0)
Local $sRect = StringFormat("[%d, %d, %d, %d]", DllStructGetData($tRECT, "Left"), _
DllStructGetData($tRECT, "Top"), _
DllStructGetData($tRECT, "Right"), _
DllStructGetData($tRECT, "Bottom"))
MsgBox($MB_SYSTEMMODAL, "Information", "angezeigtes Rechteck: " & $sRect)
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example