返回控件中焦点标签的索引
#Include <GuiTab.au3>
_GUICtrlTab_GetCurFocus($hWnd)
| $hWnd | 控件句柄 | 
| 成功: | 返回焦点标签项的 0 基索引 | 
| 失败: | 返回 -1 | 
#include <GUIConstantsEx.au3>
#include <GuiTab.au3>
$Debug_TAB = False ; 检查传递给函数的类名, 设置为True并输出到一个控件的句柄,用于检查它是否工作
_Main()
Func _Main()
    Local $hTab
    ; 创建 GUI
    GUICreate("Tab Control Get Current Focus", 400, 300)
    $hTab = GUICtrlCreateTab(2, 2, 396, 296)
    GUISetState()
    ; 添加标签
    _GUICtrlTab_InsertItem($hTab, 0, "Tab 1")
    _GUICtrlTab_InsertItem($hTab, 1, "Tab 2")
    _GUICtrlTab_InsertItem($hTab, 2, "Tab 3")
    ; Get/Set current focus
    _GUICtrlTab_SetCurFocus($hTab, 1)
    MsgBox(4160, "信息", "Current Focus: " & _GUICtrlTab_GetCurFocus($hTab))
    ; 循环直到用户退出
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main