[API]
GetTextExtentPoint32Wide
POINTAPI

[DEFINE]
Dim GetTextOutWidth_PointApi As POINTAPI

[CODE]
Public Function GetTextOutWidth(ByVal hdc As Long, ByVal xString As String) As Long
  GetTextOutWidth = Len(xString)
  Call GetTextExtentPoint32Wide(hdc, StrPtr(xString), GetTextOutWidth, GetTextOutWidth_PointApi)
  GetTextOutWidth = GetTextOutWidth_PointApi.x
  End Function
