'tabcontrol text
'此命令将更改标签的文本值，如果成功返回 TRUE 否则 FALSE。
'hWndControl：  该选项卡控件的句柄
'TabText：      为新的选项卡名称的的字符串值
'PositionIndex：选项卡索引号 （从零开始的索引）
Function FF_TabControl_SetText(ByVal hWndControl as HWnd, ByRef TabText as CWSTR , ByVal PositionIndex as Long) as Long
   Dim TB as TC_ITEMW
   
   TB.Mask = TCIF_TEXT        '  Set the item mask to return the Tab Name
   TB.pszText = TabText.vptr  '  Assign the buffer's address
   
   'Send the message to the Tab Control
   Function = SendMessageW(hWndControl, _          '  Handle To destination control
      TCM_SETITEMW, _         '  Message ID
      PositionIndex, _        '  WPARAM = Index of Tab Item
      Cast(LPARAM, VarPtr(TB)))            '  Pointer to Tab Text Value
   
End Function

