LVM_GETSTRINGWIDTH message
Applies to: desktop apps only
Determines the width of a specified string using the specified list-view control's current font. You can send this message explicitly or by using the ListView_GetStringWidth macro.
Parameters
- wParam
- Must be zero.
- lParam
-
Pointer to a null-terminated string.
Return value
Returns the string width if successful, or zero otherwise.
Remarks
The LVM_GETSTRINGWIDTH message returns the exact width, in pixels, of the specified string. If you use the returned string width as the column width in the LVM_SETCOLUMNWIDTH message, the string will be truncated. To retrieve the column width that can contain the string without truncating it, you must add padding to the returned string width.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Unicode and ANSI names | LVM_GETSTRINGWIDTHW (Unicode) and LVM_GETSTRINGWIDTHA (ANSI) |
Send comments about this topic to Microsoft
Build date: 3/6/2012