Extended list view stylesExtended list view styles*
*Contents  *Index  *Topic Contents
*Previous Topic: List view window styles
*Next Topic: List view item states

Extended list view styles


List view control styles have been extended. To use these new styles, use the LVM_SETEXTENDEDLISTVIEWSTYLE message or one of the ListView_SetExtendedListViewStyle or ListView_SetExtendedListViewStyleEx macros.
LVS_EX_CHECKBOXES Version 4.70. Enables check boxes for items in a list view control. Effectively, when set to this style, the control will create and set a state image list using DrawFrameControl. Check boxes are visible and functional with all list view modes. The state of the check box for a given item is obtained using the ListView_GetCheckState macro.

Note: To set the state of the item checkbox, use the following macro.

#ifndef ListView_SetCheckState
   #define ListView_SetCheckState(hwndLV, i, fCheck) \
      ListView_SetItemState(hwndLV, i, \
      INDEXTOSTATEIMAGEMASK((fCheck)+1), LVIS_STATEIMAGEMASK)
#endif

LVS_EX_FLATSB Version 4.71. 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.
LVS_EX_FULLROWSELECT Version 4.70. 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.
LVS_EX_GRIDLINES Version 4.70. Displays gridlines around items and subitems. This style is available only in conjunction with the LVS_REPORT style.
LVS_EX_HEADERDRAGDROP Version 4.70. 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.
LVS_EX_INFOTIP Version 4.71. The list view control sends an LVN_GETINFOTIP notification message to the parent window before displaying an item's tooltip. This style is only available to list view controls that use the LVS_ICON style.
LVS_EX_MULTIWORKAREAS Version 4.71. 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.
LVS_EX_ONECLICKACTIVATE Version 4.70. The list view control sends an LVN_ITEMACTIVATE notification message 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.
LVS_EX_REGIONAL Version 4.71. The list view will create a region that includes only the item icons and text and set its window region to that using SetWindowRgn. This will exclude any area that is not part of an item from the window region. This style is only available to list view controls that use the LVS_ICON style.
LVS_EX_SUBITEMIMAGES Version 4.70. Allows images to be displayed for subitems. This style is available only in conjunction with the LVS_REPORT style.
LVS_EX_TRACKSELECT Version 4.70. Enables hover selection in a list view control. Hover selection (also called 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 the LVM_SETHOVERTIME message. This style applies to all styles of list view control.
LVS_EX_TWOCLICKACTIVATE    Version 4.70. The list view control sends an LVN_ITEMACTIVATE notification message 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.
LVS_EX_UNDERLINECOLD Version 4.71. Causes nonhot items to be displayed with underlined text. This style is ignored if LVS_EX_ONECLICKACTIVATE is not set.
LVS_EX_UNDERLINEHOT Version 4.71. Causes hot items to be displayed with underlined text. This style is ignored if LVS_EX_ONECLICKACTIVATE or LVS_EX_TWOCLICKACTIVATE is not set.


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