The ListView_GetStringWidth() function returns the number of pixels required to fully display a string in the current font of a specified list view field.
ListView_GetStringWidth(list_view_field, string)
• list_view_field – The list view field in which the string will be displayed.
• string – The string whose width is being returned.
An integer containing the number of pixels required to fully display the string.
This function is typically used to find out whether a specific string will fit in a column of a list view field. If necessary, use the ListView_ColumnSetWidth() function to change the width of a column to display the string without truncating.