'tabcontrol text
'此命令将返回传递的索引值的选项卡标签名称，否则将返回则 TRUE 或 FALSE。
'hWndControl： 该选项卡控件的句柄
'PositionIndex：选项卡索引号 （从零开始的索引）
Function FF_TabControl_GetText (ByVal hWndControl as HWnd, ByVal PositionIndex as Long) as CWSTR 
   Dim TB as TC_ITEMW
   Dim TabName as wString * MAX_PATH
   Dim lResult as Long
      
   TB.Mask       = TCIF_TEXT       '  Set the item mask to return the Tab Name
   TB.cchTextMax = SizeOf(TabName)  '  Size the name buffer
   TB.pszText    = VarPtr(TabName)  '  Assign the buffer's address
   
   '  Send the message to the Tab Control
   lResult = SendMessageW( hWndControl, _          '  Handle To destination control
                          TCM_GETITEMW, _         '  Message ID
                          PositionIndex, _        '  WPARAM = Index of Tab Item
                          Cast(LPARAM, VarPtr(TB) ))            '  Pointer to Tab Text Value    
   
   Return TabName
   
End Function   

