Extended List-View Styles
Use the LVM_SETEXTENDEDLISTVIEWSTYLE message or one of the ListView_SetExtendedListViewStyle or ListView_SetExtendedListViewStyleEx macros to employ these extended list-view control styles.
Constant | Description |
---|---|
|
Windows Vista and later. Automatically arrange icons if no icon positions have been set (Similar to LVS_AUTOARRANGE). |
|
Windows Vista and later. Automatically select check boxes on single click. |
|
Windows Vista and later. Automatically size listview columns. |
|
Version 4.71 and later. Changes border color when an item is selected, instead of highlighting the item. |
|
Version 4.70. Enables check boxes for items in a list-view control. When set to this style, the control creates and sets a state image list with two images using DrawFrameControl. State image 1 is the unchecked box, and state image 2 is the checked box. Setting the state image to zero removes the check box. Version 6.00 and later Check boxes are visible and functional with all list view modes except the tile view mode introduced in ComCtl32.dll version 6. Clicking a checkbox in tile view mode only selects the item; the state does not change. You can obtain the state of the check box for a given item with ListView_GetCheckState. To set the check state, use ListView_SetCheckState. If this style is set, the list-view control automatically toggles the check state when the user clicks the check box or presses the space bar. |
|
Indicates that an overflow button should be displayed in icon/tile view if there is not enough client width to display the complete set of header items. The list-view control sends the LVN_COLUMNOVERFLOWCLICK notification when the overflow button is clicked. This flag is only valid when LVS_EX_HEADERINALLVIEWS is also specified. |
|
Windows Vista and later. Snap to minimum column width when the user resizes a column. |
|
Version 6.00 and later. Paints via double-buffering, which reduces flicker. This extended style also enables alpha-blended marquee selection on systems where it is supported. |
|
Enables flat scroll bars in the list view. If you need more control over the appearance of the list view's scroll bars, you should manipulate the list view's scroll bars directly using the Flat Scroll Bar APIs. If the system metrics change, you are responsible for adjusting the scroll bar metrics with FlatSB_SetScrollProp. See Flat Scroll Bars for further details. |
|
When an item is selected, the item and all its subitems are highlighted. This style is available only in conjunction with the LVS_REPORT style. |
|
Displays gridlines around items and subitems. This style is available only in conjunction with the LVS_REPORT style. |
|
Enables drag-and-drop reordering of columns in a list-view control. This style is only available to list-view controls that use the LVS_REPORT style. |
|
Windows Vista and later. Show column headers in all view modes. |
|
Version 6.00 and later. Hides the labels in icon and small icon view. |
|
When a list-view control uses the LVS_EX_INFOTIP style, the LVN_GETINFOTIP notification code is sent to the parent window before displaying an item's tooltip. |
|
Windows Vista and later. Icons are lined up in columns that use up the whole view. |
|
If a partially hidden label in any list view mode lacks tooltip text, the list-view control will unfold the label. If this style is not set, the list-view control will unfold partly hidden labels only for the large icon mode. |
|
If the list-view control has the LVS_AUTOARRANGE style, the control will not autoarrange its icons until one or more work areas are defined (see LVM_SETWORKAREAS). To be effective, this style must be set before any work areas are defined and any items have been added to the control. |
|
The list-view control sends an LVN_ITEMACTIVATE notification code to the parent window when the user clicks an item. This style also enables hot tracking in the list-view control. Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. See the Extended List-View Styles Remarks section for a discussion of item activation. |
|
Version 4.71 through Version 5.80 only. Not supported on Windows Vista and later. Sets the list view window region to include only the item icons and text using SetWindowRgn. Any area that is not part of an item is excluded from the window region. This style is only available to list-view controls that use the LVS_ICON style. |
|
Version 6.00 and later. In icon view, moves the state image of the control to the top right of the large icon rendering. In views other than icon view there is no change. When the user changes the state by using the space bar, all selected items cycle over, not the item with the focus. |
|
Version 6.00 and later. Not used. |
|
Version 6.00 and later. In icon view, icons automatically snap into a grid. |
|
Allows images to be displayed for subitems. This style is available only in conjunction with the LVS_REPORT style. |
|
Enables hot-track selection in a list-view control. Hot track selection means that an item is automatically selected when the cursor remains over the item for a certain period of time. The delay can be changed from the default system setting with a LVM_SETHOVERTIME message. This style applies to all styles of list-view control. You can check whether hot-track selection is enabled by calling SystemParametersInfo. |
|
Windows Vista and later. Background is painted by the parent via WM_PRINTCLIENT. |
|
Windows Vista and later. Enable shadow text on transparent backgrounds only. |
|
The list-view control sends an LVN_ITEMACTIVATE notification code to the parent window when the user double-clicks an item. This style also enables hot tracking in the list-view control. Hot tracking means that when the cursor moves over an item, it is highlighted but not selected. See the Extended List-View Styles Remarks section for a discussion of item activation. |
|
Causes those non-hot items that may be activated to be displayed with underlined text. This style requires that LVS_EX_TWOCLICKACTIVATE be set also. See the Extended List-View Styles Remarks section for a discussion of item activation. |
|
Causes those hot items that may be activated to be displayed with underlined text. This style requires that LVS_EX_ONECLICKACTIVATE or LVS_EX_TWOCLICKACTIVATE also be set. See the Extended List-View Styles Remarks section for a discussion of item activation. |
Remarks
Note
Comctl32.dll version 6 is not redistributable but it is included in Windows. To use Comctl32.dll version 6, specify it in a manifest. For more information on manifests, see Enabling Visual Styles.
An item becomes hot when the mouse hovers over it. If hot-tracking is enabled, hot items will be highlighted, but the user must still click the item at least once to select it. Activating an item causes the list-view control to send an LVN_ITEMACTIVATE notification. An item may be selected when it is in a state in which a single click will select it.
If the LVS_EX_ONECLICKACTIVATE style is set, only one click is required to select any item, so all items may be selected. If the LVS_EX_TWOCLICKACTIVATE style is set, two clicks are required to select an item. With this style, the item may be selected only after it has been clicked once.
Setting the LVS_EX_UNDERLINEHOT style will cause the text of any hot item that may be selected to be underlined. Setting the LVS_EX_UNDERLINECOLD style will cause the text of items that are not hot, but may be selected, to be underlined.
Requirements
Requirement | Value |
---|---|
Header |
|