Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ListView_GetStringWidth

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This macro determines the width of a specified string, using the specified list-view control's current font. You can use this macro or send the LVM_GETSTRINGWIDTH message explicitly.


int ListView_GetStringWidth( 
  HWND hwnd, 
  LPCSTR psz 
);

hwnd

Handle to the list-view control.

psz

Pointer to a null-terminated string.

The string width indicates success. Zero indicates failure.

The ListView_GetStringWidth macro returns the exact width, in pixels, of the specified string. If you use the returned string width as the column width in a call to the ListView_SetColumnWidth macro, the string will be truncated. To get the column width that can contain the string without truncating it, you must add padding to the returned string width.

Related message: LVM_GETSTRINGWIDTH

Headercommctrl.h
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2014 Microsoft