ListView_GetStringWidth()

Examples


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.

Syntax

ListView_GetStringWidth(list_view_field, string)

Parameters

list_view_field – The list view field in which the string will be displayed.

string – The string whose width is being returned.

Return value

An integer containing the number of pixels required to fully display the string.

Comments

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.


Documentation Feedback