ListView_SetColumnWidth
This macro changes the width of a column in report or list view. You can use this macro or send the LVM_SETCOLUMNWIDTH message explicitly.
BOOL ListView_SetColumnWidth(
HWND hwnd,
int iCol,
int cx );
Parameters
- hwnd
Handle to the list view control. - iCol
Index of the column. In list view, the iCol parameter must be **–**1. - cx
New width of the column, in list view coordinates, or one of the following values:Value Description LVSCW_AUTOSIZE Automatically sizes the column. LVSCW_AUTOSIZE_USEHEADER Automatically sizes the column to fit the header text.
Return Values
TRUE indicates success. FALSE indicates failure.
Remarks
ListView_SetColumnWidth converts the cx parameter to a 16-bit value.
Related message: LVM_SETCOLUMNWIDTH
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Commctrl.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.