List-View Window Styles
The following window styles are specific to list-view controls.
Constant | Description |
---|---|
|
Items are left-aligned in icon and small icon view. |
|
The control's current alignment. |
|
Items are aligned with the top of the list-view control in icon and small icon view. |
|
Icons are automatically kept arranged in icon and small icon view. |
|
Item text can be edited in place. The parent window must process the LVN_ENDLABELEDIT notification code. |
|
This style specifies icon view. |
|
This style specifies list view. |
|
Column headers are not displayed in report view. By default, columns have headers in report view. |
|
Item text is displayed on a single line in icon view. By default, item text may wrap in icon view. |
|
Scrolling is disabled. All items must be within the client area. This style is not compatible with the LVS_LIST or LVS_REPORT styles. See Knowledge Base Article Q137520 for further discussion. |
|
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. |
|
Version 4.70. This style specifies a virtual list-view control. For more information about this list control style, see About List-View Controls. |
|
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 iItemData member of the DRAWITEMSTRUCT structure contains the item data for the specified list-view item. |
|
This style specifies 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. See LVCOLUMN for further information on column alignment. |
|
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. |
|
The selection, if any, is always shown, even if the control does not have the focus. |
|
Only one item at a time can be selected. By default, multiple items may be selected. |
|
This style specifies small icon view. |
|
Item indexes are sorted based on item text in ascending order. |
|
Item indexes are sorted based on item text in descending order. |
|
Determines the control's current window style. |
|
Determines the window styles that control item alignment and header appearance and behavior. |
Remarks
For the LVS_SORTASCENDING and LVS_SORTDESCENDING styles, item indexes are sorted based on item text in ascending or descending order, respectively. Because the LVS_LIST and LVS_REPORT views display items in the same order as their indexes, the results of sorting are immediately visible to the user. The LVS_ICON and LVS_SMALLICON views do not use item indexes to determine the position of icons. With those views, the results of sorting are not visible to the user.
You can use the LVS_TYPEMASK mask to isolate the window styles that correspond to the current view: LVS_ICON, LVS_LIST, LVS_REPORT, and LVS_SMALLICON.
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).
Requirements
Requirement | Value |
---|---|
Header |
|