List view window stylesList view window styles*
*



Contents  *



Index  *Topic Contents
*Previous Topic: List View Control Reference
*Next Topic: Extended list view styles

List view window styles


The following window styles are specific to list view controls.
LVS_ALIGNLEFT Items are left-aligned in icon and small icon view.
LVS_ALIGNTOP Items are aligned with the top of the list view control in icon and small icon view.
LVS_AUTOARRANGE Icons are automatically kept arranged in icon and small icon view.
LVS_EDITLABELS Item text can be edited in place. The parent window must process the LVN_ENDLABELEDIT notification message.
LVS_ICON Icon view.
LVS_LIST List view.
LVS_NOCOLUMNHEADER Column headers are not displayed in report view. By default, columns have headers in report view.
LVS_NOLABELWRAP Item text is displayed on a single line in icon view. By default, item text may wrap in icon view.
LVS_NOSCROLL Scrolling is disabled. All items must be within the client area.
LVS_NOSORTHEADER Column headers do not work like buttons. This style can be used if clicking a column header in report view does not carry out an action, such as sorting.
LVS_OWNERDATA Version 4.70. Specifies a virtual list view control. For more information about this list control style, see Virtual list view description.
LVS_OWNERDRAWFIXED The owner window can paint items in report view. The list view control sends a WM_DRAWITEM message to paint each item; it does not send separate messages for each subitem. The itemData member of the DRAWITEMSTRUCT structure contains the item data for the specified list view item.
LVS_REPORT Report view. When using the LVS_REPORT style with a list view control, the first column is always left-aligned. You cannot use LVCFMT_RIGHT to change this alignment.
LVS_SHAREIMAGELISTS The image list will not be deleted when the control is destroyed. This style enables the use of the same image lists with multiple list view controls.
LVS_SHOWSELALWAYS The selection, if any, is always shown, even if the control does not have the focus.
LVS_SINGLESEL Only one item at a time can be selected. By default, multiple items may be selected.
LVS_SMALLICON Small icon view.
LVS_SORTASCENDING Items are sorted based on item text in ascending order.
LVS_SORTDESCENDING Items are sorted based on item text in descending order.

You can use the LVS_TYPEMASK mask to isolate the window styles that correspond to the current view: LVS_ICON, LVS_SMALLICON, LVS_LIST, and LVS_REPORT.

You can use the LVS_ALIGNMASK mask to isolate the window styles that specify the alignment of items: LVS_ALIGNLEFT and LVS_ALIGNTOP.

You can use the LVS_TYPESTYLEMASK mask to isolate the window styles that control item alignment (LVS_ALIGNLEFT and LVS_ALIGNTOP) and those that control header appearance and behavior (LVS_NOCOLUMNHEADER and LVS_NOSORTHEADER).


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.