Rediger

Del via


List View

This section contains information about the programming elements used with list-view controls.

Overviews

Topic Contents
About List-View Controls A list-view control is a window that displays a collection of items.
Default List-View Message Processing This section lists the window message processing performed by a list-view control.
Using List-View Controls This section contains code examples that demonstrate how to create and use list-view controls in your applications.

Macros

Topic Contents
ListView_ApproximateViewRect Calculates the approximate width and height required to display a given number of items. You can use this macro or send the LVM_APPROXIMATEVIEWRECT message explicitly.
ListView_Arrange Arranges items in icon view. You can use this macro or send the LVM_ARRANGE message explicitly.
ListView_CancelEditLabel Cancels an item text editing operation. You can use this macro or send the LVM_CANCELEDITLABEL message explicitly.
ListView_CreateDragImage Creates a drag image list for the specified item. You can use this macro or send the LVM_CREATEDRAGIMAGE message explicitly.
ListView_DeleteAllItems Removes all items from a list-view control. You can use this macro or send the LVM_DELETEALLITEMS message explicitly.
ListView_DeleteColumn Removes a column from a list-view control. You can use this macro or send the LVM_DELETECOLUMN message explicitly.
ListView_DeleteItem Removes an item from a list-view control. You can use this macro or send the LVM_DELETEITEM message explicitly.
ListView_EditLabel Begins in-place editing of the specified list-view item's text. The message implicitly selects and focuses the specified item. You can use this macro or send the LVM_EDITLABEL message explicitly.
ListView_EnableGroupView Enables or disables whether the items in a list-view control display as a group. You can use this macro or send the LVM_ENABLEGROUPVIEW message explicitly.
ListView_EnsureVisible Ensures that a list-view item is either entirely or partially visible, scrolling the list-view control if necessary. You can use this macro or send the LVM_ENSUREVISIBLE message explicitly.
ListView_FindItem Searches for a list-view item with the specified characteristics. You can use this macro or send the LVM_FINDITEM message explicitly.
ListView_GetBkColor Gets the background color of a list-view control. You can use this macro or send the LVM_GETBKCOLOR message explicitly.
ListView_GetBkImage Gets the background image in a list-view control. You can use this macro or send the LVM_GETBKIMAGE message explicitly.
ListView_GetCallbackMask Gets the callback mask for a list-view control. You can use this macro or send the LVM_GETCALLBACKMASK message explicitly.
ListView_GetCheckState Determines if an item in a list-view control is selected. This should be used only for list-view controls that have the LVS_EX_CHECKBOXES style.
ListView_GetColumn Gets the attributes of a list-view control's column. You can use this macro or send the LVM_GETCOLUMN message explicitly.
ListView_GetColumnOrderArray Gets the current left-to-right order of columns in a list-view control. You can use this macro or send the LVM_GETCOLUMNORDERARRAY message explicitly.
ListView_GetColumnWidth Gets the width of a column in report or list view. You can use this macro or send the LVM_GETCOLUMNWIDTH message explicitly.
ListView_GetCountPerPage Calculates the number of items that can fit vertically in the visible area of a list-view control when in list or report view. Only fully visible items are counted. You can use this macro or send the LVM_GETCOUNTPERPAGE message explicitly.
ListView_GetEditControl Gets the handle to the edit control being used to edit a list-view item's text. You can use this macro or send the LVM_GETEDITCONTROL message explicitly.
ListView_GetEmptyText Gets the text meant for display when the list-view control appears empty. Use this macro or send the LVM_GETEMPTYTEXT message explicitly.
ListView_GetExtendedListViewStyle Gets the extended styles that are currently in use for a given list-view control. You can use this macro or send the LVM_GETEXTENDEDLISTVIEWSTYLE message explicitly.
ListView_GetFocusedGroup Gets the group that has the focus. Use this macro or send the LVM_GETFOCUSEDGROUP message explicitly.
ListView_GetFooterInfo Gets information on the footer of a specified list-view control. Use this macro or send the LVM_GETFOOTERINFO message explicitly.
ListView_GetFooterItem Gets information on a footer item for a specified list-view control. Use this macro or send the LVM_GETFOOTERITEM message explicitly.
ListView_GetFooterItemRect Gets the coordinates of a footer for a specified item in a list-view control. Use this macro or send the LVM_GETFOOTERITEMRECT message explicitly.
ListView_GetFooterRect Gets the coordinates of the footer for a specified list-view control. Use this macro or send the LVM_GETFOOTERRECT message explicitly.
ListView_GetGroupCount Gets the number of groups. You can use this macro or send the LVM_GETGROUPCOUNT message explicitly.
ListView_GetGroupHeaderImageList Gets the group header image list that has been set for an existing list-view control.
ListView_GetGroupInfo Gets group information. You can use this macro or send the LVM_GETGROUPINFO message explicitly.
ListView_GetGroupInfoByIndex Gets information on a specified group. Use this macro or send the LVM_GETGROUPINFOBYINDEX message explicitly.
ListView_GetGroupMetrics Gets information about the display of groups. You can use this macro or send the LVM_GETGROUPMETRICS message explicitly.
ListView_GetGroupRect Gets the rectangle for a specified group. Use this macro or send the LVM_GETGROUPRECT message explicitly.
ListView_GetGroupState Gets the state for a specified group. Use this macro or send the LVM_GETGROUPSTATE message explicitly.
ListView_GetHeader Gets the handle to the header control used by a list-view control. You can use this macro or send the LVM_GETHEADER message explicitly.
ListView_GetHotCursor Gets the HCURSOR used when the pointer is over an item while hot tracking is enabled. You can use this macro or send the LVM_GETHOTCURSOR message explicitly.
ListView_GetHotItem Gets the index of the hot item. You can use this macro or send the LVM_GETHOTITEM message explicitly.
ListView_GetHoverTime Gets the amount of time that the mouse cursor must hover over an item before it is selected. You can use this macro or send the LVM_GETHOVERTIME message explicitly.
ListView_GetImageList Gets the handle to an image list used for drawing list-view items. You can use this macro or send the LVM_GETIMAGELIST message explicitly.
ListView_GetInsertMark Gets the position of the insertion point. You can use this macro or send the LVM_GETINSERTMARK message explicitly.
ListView_GetInsertMarkColor Gets the color of the insertion point. You can use this macro or send the LVM_GETINSERTMARKCOLOR message explicitly.
ListView_GetInsertMarkRect Gets the rectangle that bounds the insertion point. You can use this macro or send the LVM_GETINSERTMARKRECT message explicitly.
ListView_GetISearchString Gets the incremental search string of a list-view control. You can use this macro or send the LVM_GETISEARCHSTRING message explicitly.
ListView_GetItem Gets some or all of a list-view item's attributes. You can use this macro or send the LVM_GETITEM message explicitly.
ListView_GetItemCount Gets the number of items in a list-view control. You can use this macro or send the LVM_GETITEMCOUNT message explicitly.
ListView_GetItemIndexRect Gets the bounding rectangle for all or part of a subitem in the current view of a specified list-view control. Use this macro or send the LVM_GETITEMINDEXRECT message explicitly.
ListView_GetItemPosition Gets the position of a list-view item. You can use this macro or explicitly send the LVM_GETITEMPOSITION message.
ListView_GetItemRect Gets the bounding rectangle for all or part of an item in the current view. You can use this macro or send the LVM_GETITEMRECT message explicitly.
ListView_GetItemSpacing Determines the spacing between items in a list-view control. You can use this macro or send the LVM_GETITEMSPACING message explicitly.
ListView_GetItemState Gets the state of a list-view item. You can use this macro or send the LVM_GETITEMSTATE message explicitly.
ListView_GetItemText Gets the text of a list-view item or subitem. You can use this macro or send the LVM_GETITEMTEXT message explicitly.
ListView_GetNextItem Searches for a list-view item that has the specified properties and bears the specified relationship to a specified item. You can use this macro or send the LVM_GETNEXTITEM message explicitly.
ListView_GetNextItemIndex Gets the index of the item in a particular list-view control that has the specified properties and relationship to another specific item. Use this macro or send the LVM_GETNEXTITEMINDEX message explicitly.
ListView_GetNumberOfWorkAreas Gets the number of working areas in a list-view control. You can use this macro or send the LVM_GETNUMBEROFWORKAREAS message explicitly.
ListView_GetOrigin Gets the current view origin for a list-view control. You can use this macro or send the LVM_GETORIGIN message explicitly.
ListView_GetOutlineColor Gets the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set. You can use this macro or send the LVM_GETOUTLINECOLOR message explicitly.
ListView_GetSelectedColumn Gets an integer that specifies the selected column. You can use this macro or send the LVM_GETSELECTEDCOLUMN message explicitly.
ListView_GetSelectedCount Determines the number of selected items in a list-view control. You can use this macro or send the LVM_GETSELECTEDCOUNT message explicitly.
ListView_GetSelectionMark Gets the selection mark from a list-view control. You can use this macro or explicitly send the LVM_GETSELECTIONMARK message.
ListView_GetStringWidth Determines the width of a specified string using the specified list-view control's current font. You can use this macro or send the LVM_GETSTRINGWIDTH message explicitly.
ListView_GetSubItemRect Gets information about the rectangle that surrounds a subitem in a list-view control. You can use this macro (recommended) or send the LVM_GETSUBITEMRECT message explicitly. This macro is intended to be used only on list-view controls that use the LVS_REPORT style.
ListView_GetTextBkColor Gets the text background color of a list-view control. You can use this macro or send the LVM_GETTEXTBKCOLOR message explicitly.
ListView_GetTextColor Gets the text color of a list-view control. You can use this macro or send the LVM_GETTEXTCOLOR message explicitly.
ListView_GetTileInfo Gets information about a tile in a list-view control. You can use this macro or send the LVM_GETTILEINFO message explicitly.
ListView_GetTileViewInfo Gets information about a list-view control in tile view. You can use this macro or send the LVM_GETTILEVIEWINFO message explicitly.
ListView_GetToolTips Gets the tooltip control that the list-view control uses to display tooltips. You can use this macro or send the LVM_GETTOOLTIPS message explicitly.
ListView_GetTopIndex Gets the index of the topmost visible item when in list or report view. You can use this macro or send the LVM_GETTOPINDEX message explicitly.
ListView_GetUnicodeFormat Gets the Unicode character format flag for the control. You can use this macro or send the LVM_GETUNICODEFORMAT message explicitly.
ListView_GetView Gets the current view of a list-view control. You can use this macro or send the LVM_GETVIEW message explicitly.
ListView_GetViewRect Gets the bounding rectangle of all items in the list-view control. The list view must be in icon or small icon view. You can use this macro or send the LVM_GETVIEWRECT message explicitly.
ListView_GetWorkAreas Gets the working areas from a list-view control. You can use this macro, or send the LVM_GETWORKAREAS message explicitly.
ListView_HasGroup Determines whether the list-view control has a specified group. You can use this macro or send the LVM_HASGROUP message explicitly.
ListView_HitTest Determines which list-view item, if any, is at a specified position. You can use this macro or send the LVM_HITTEST message explicitly.
ListView_HitTestEx Determines which list-view item, if any, is at a specified position. You can use this macro or send the LVM_HITTEST message explicitly.
ListView_InsertColumn Inserts a new column in a list-view control. You can use this macro or send the LVM_INSERTCOLUMN message explicitly.
ListView_InsertGroup Inserts a group into a list-view control. You can use this macro or send the LVM_INSERTGROUP message explicitly.
ListView_InsertGroupSorted Inserts a group into an ordered list of groups. You can use this macro or send the LVM_INSERTGROUPSORTED message explicitly.
ListView_InsertItem Inserts a new item in a list-view control. You can use this macro or send the LVM_INSERTITEM message explicitly.
ListView_InsertMarkHitTest Retrieves the insertion point closest to a specified point. You can use this macro or send the LVM_INSERTMARKHITTEST message explicitly.
ListView_IsGroupViewEnabled Checks whether the list-view control has group view enabled. You can use this macro or send the LVM_ISGROUPVIEWENABLED message explicitly.
ListView_IsItemVisible Indicates whether an item in the list-view control is visible. Use this macro or send the LVM_ISITEMVISIBLE message explicitly.
ListView_MapIDToIndex Maps the ID of an item to an index. You can use this macro or send the LVM_MAPIDTOINDEX message explicitly.
ListView_MapIndexToID Maps the index of an item to a unique ID. You can use this macro or send the LVM_MAPINDEXTOID message explicitly.
ListView_MoveGroup Not implemented.
ListView_MoveItemToGroup Not implemented.
ListView_RedrawItems Forces a list-view control to redraw a range of items. You can use this macro or send the LVM_REDRAWITEMS message explicitly.
ListView_RemoveAllGroups Removes all groups from a list-view control. You can use this macro or send the LVM_REMOVEALLGROUPS message explicitly.
ListView_RemoveGroup Removes a group from a list-view control. You can use this macro or send the LVM_REMOVEGROUP message explicitly.
ListView_Scroll Scrolls the content of a list-view control. You can use this macro or send the LVM_SCROLL message explicitly.
ListView_SetBkColor Sets the background color of a list-view control. You can use this macro or send the LVM_SETBKCOLOR message explicitly.
ListView_SetBkImage Sets the background image in a list-view control. You can use this macro or send the LVM_SETBKIMAGE message explicitly.
ListView_SetCallbackMask Changes the callback mask for a list-view control. You can use this macro or send the LVM_SETCALLBACKMASK message explicitly.
ListView_SetCheckState Selects or deselects an item in a list-view control. You can use this macro or send the LVM_SETITEMSTATE message explicitly.
ListView_SetColumn Sets the attributes of a list-view column. You can use this macro or send the LVM_SETCOLUMN message explicitly.
ListView_SetColumnOrderArray Sets the left-to-right order of columns in a list-view control. You can use this macro or send the LVM_SETCOLUMNORDERARRAY message explicitly.
ListView_SetColumnWidth Used to change the width of a column in report view or the width of all columns in list-view mode. You can use this macro or send the LVM_SETCOLUMNWIDTH message explicitly.
ListView_SetExtendedListViewStyle Sets extended styles for list-view controls. You can use this macro or send the LVM_SETEXTENDEDLISTVIEWSTYLE message explicitly.
ListView_SetExtendedListViewStyleEx Sets extended styles for list-view controls using the style mask. You can use this macro or send the LVM_SETEXTENDEDLISTVIEWSTYLE message explicitly.
ListView_SetGroupHeaderImageList Assigns an image list to the group header of a list-view control.
ListView_SetGroupInfo Sets group information. You can use this macro or send the LVM_SETGROUPINFO message explicitly.
ListView_SetGroupMetrics Sets information about the display of groups. You can use this macro or send the LVM_SETGROUPMETRICS message explicitly.
ListView_SetGroupState Sets the state for a specified group.
ListView_SetHotCursor Sets the HCURSOR that the list-view control uses when the pointer is over an item while hot tracking is enabled. You can use this macro or send the LVM_SETHOTCURSOR message explicitly. To check whether hot tracking is enabled, call SystemParametersInfo.
ListView_SetHotItem Sets the hot item in a list-view control. You can use this macro or send the LVM_SETHOTITEM message explicitly.
ListView_SetHoverTime Sets the amount of time that the mouse cursor must hover over an item before it is selected. You can use this macro or send the LVM_SETHOVERTIME message explicitly.
ListView_SetIconSpacing Sets the spacing between icons in list-view controls set to the LVS_ICON style. You can use this macro or send the LVM_SETICONSPACING message explicitly.
ListView_SetImageList Assigns an image list to a list-view control. You can use this macro or send the LVM_SETIMAGELIST message explicitly.
ListView_SetInfoTip Sets tooltip text. You can use this macro or send the LVM_SETINFOTIP message explicitly.
ListView_SetInsertMark Sets the insertion point to the defined position. You can use this macro or send the LVM_SETINSERTMARK message explicitly.
ListView_SetInsertMarkColor Sets the color of the insertion point. You can use this macro or send the LVM_SETINSERTMARKCOLOR message explicitly.
ListView_SetItem Sets some or all of a list-view item's attributes. You can also use ListView_SetItem to set the text of a subitem. You can use this macro or send the LVM_SETITEM message explicitly.
ListView_SetItemCount Causes the list-view control to allocate memory for the specified number of items. You can use this macro or send the LVM_SETITEMCOUNT message explicitly.
ListView_SetItemCountEx Sets the virtual number of items in a virtual list view. You can use this macro or send the LVM_SETITEMCOUNT message explicitly.
ListView_SetItemIndexState Sets the state of a specified list-view item. Use this macro or send the LVM_SETITEMINDEXSTATE message explicitly.
ListView_SetItemPosition Moves an item to a specified position in a list-view control (in icon or small icon view). You can use this macro or send the LVM_SETITEMPOSITION message explicitly.
ListView_SetItemPosition32 Moves an item to a specified position in a list-view control (in icon or small icon view). This macro differs from the ListView_SetItemPosition macro in that it uses 32-bit coordinates. You can use the ListView_SetItemPosition32 macro or send the LVM_SETITEMPOSITION32 message explicitly.
ListView_SetItemState Changes the state of an item in a list-view control. You can use this macro or send the LVM_SETITEMSTATE message explicitly.
ListView_SetItemText Changes the text of a list-view item or subitem. You can use this macro or send the LVM_SETITEMTEXT message explicitly.
ListView_SetOutlineColor Sets the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set. You can use this macro or send the LVM_SETOUTLINECOLOR message explicitly.
ListView_SetSelectedColumn Sets the index of the selected column. You can use this macro or send the LVM_SETSELECTEDCOLUMN message explicitly.
ListView_SetSelectionMark Sets the selection mark in a list-view control. You can use this macro or send the LVM_SETSELECTIONMARK message explicitly.
ListView_SetTextBkColor Sets the background color of text in a list-view control. You can use this macro or send the LVM_SETTEXTBKCOLOR message explicitly.
ListView_SetTextColor Sets the text color of a list-view control. You can use this macro or send the LVM_SETTEXTCOLOR message explicitly.
ListView_SetTileInfo Sets information for an existing tile of a list-view control. You can use this macro or send the LVM_SETTILEINFO message explicitly.
ListView_SetTileViewInfo Sets information that a list-view control uses in tile view. You can use this macro or send the LVM_SETTILEVIEWINFO message explicitly.
ListView_SetToolTips Sets the tooltip control that the list-view control will use to display tooltips. You can use this macro or send the LVM_SETTOOLTIPS message explicitly.
ListView_SetUnicodeFormat Sets the Unicode character format flag for the control. This message allows you to change the character set used by the control at run time rather than having to re-create the control. You can use this macro or send the LVM_SETUNICODEFORMAT message explicitly.
ListView_SetView Sets the view of a list-view control. You can use this macro or send the LVM_SETVIEW message explicitly.
ListView_SetWorkAreas Sets the working areas within a list-view control. You can use this macro or send the LVM_SETWORKAREAS message explicitly.
ListView_SortGroups Uses an application-defined comparison function to sort groups by ID within a list-view control. You can use this macro or send the LVM_SORTGROUPS message explicitly.
ListView_SortItems Uses an application-defined comparison function to sort the items of a list-view control. The index of each item changes to reflect the new sequence. You can use this macro or send the LVM_SORTITEMS message explicitly.
ListView_SortItemsEx Uses an application-defined comparison function to sort the items of a list-view control. The index of each item changes to reflect the new sequence. You can use this macro or send the LVM_SORTITEMSEX message explicitly.
ListView_SubItemHitTest Determines which list-view item or subitem is located at a given position. You can use this macro or send the LVM_SUBITEMHITTEST message explicitly.
ListView_SubItemHitTestEx Determines which list-view item or subitem is located at a given position. You can use this macro or send the LVM_SUBITEMHITTEST message explicitly.
ListView_Update Updates a list-view item. If the list-view control has the LVS_AUTOARRANGE style, this macro causes the list-view control to be arranged. You can use this macro or send the LVM_UPDATE message explicitly.

Messages

Topic Contents
LVM_APPROXIMATEVIEWRECT Calculates the approximate width and height required to display a given number of items. You can send this message explicitly or use the ListView_ApproximateViewRect macro.
LVM_ARRANGE Arranges items in icon view. You can send this message explicitly or by using the ListView_Arrange macro.
LVM_CANCELEDITLABEL Cancels an item text editing operation.
LVM_CREATEDRAGIMAGE Creates a drag image list for the specified item. You can send this message explicitly or by using the ListView_CreateDragImage macro.
LVM_DELETEALLITEMS Removes all items from a list-view control. You can send this message explicitly or by using the ListView_DeleteAllItems macro.
LVM_DELETECOLUMN Removes a column from a list-view control. You can send this message explicitly or by using the ListView_DeleteColumn macro.
LVM_DELETEITEM Removes an item from a list-view control. You can send this message explicitly or by using the ListView_DeleteItem macro.
LVM_EDITLABEL Begins in-place editing of the specified list-view item's text. The message implicitly selects and focuses the specified item. You can send this message explicitly or by using the ListView_EditLabel macro.
LVM_ENABLEGROUPVIEW Enables or disables whether the items in a list-view control display as a group.
LVM_ENSUREVISIBLE Ensures that a list-view item is either entirely or partially visible, scrolling the list-view control if necessary. You can send this message explicitly or by using the ListView_EnsureVisible macro.
LVM_FINDITEM Searches for a list-view item with the specified characteristics. You can send this message explicitly or by using the ListView_FindItem macro.
LVM_GETBKCOLOR Gets the background color of a list-view control. You can send this message explicitly or by using the ListView_GetBkColor macro.
LVM_GETBKIMAGE Gets the background image in a list-view control. You can send this message explicitly or by using the ListView_GetBkImage macro.
LVM_GETCALLBACKMASK Gets the callback mask for a list-view control. You can send this message explicitly or by using the ListView_GetCallbackMask macro.
LVM_GETCOLUMN Gets the attributes of a list-view control's column. You can send this message explicitly or by using the ListView_GetColumn macro.
LVM_GETCOLUMNORDERARRAY Gets the current left-to-right order of columns in a list-view control. You can send this message explicitly or use the ListView_GetColumnOrderArray macro.
LVM_GETCOLUMNWIDTH Gets the width of a column in report or list view. You can send this message explicitly or by using the ListView_GetColumnWidth macro.
LVM_GETCOUNTPERPAGE Calculates the number of items that can fit vertically in the visible area of a list-view control when in list or report view. Only fully visible items are counted. You can send this message explicitly or by using the ListView_GetCountPerPage macro.
LVM_GETEDITCONTROL Gets the handle to the edit control being used to edit a list-view item's text. You can send this message explicitly or by using the ListView_GetEditControl macro.
LVM_GETEMPTYTEXT Gets the text meant for display when the list-view control appears empty. Send this message explicitly or by using the ListView_GetEmptyText macro.
LVM_GETEXTENDEDLISTVIEWSTYLE Gets the extended styles that are currently in use for a given list-view control. You can send this message explicitly or use the ListView_GetExtendedListViewStyle macro.
LVM_GETFOCUSEDGROUP Gets the group that has the focus. Send this message explicitly or by using the ListView_GetFocusedGroup macro.
LVM_GETFOOTERINFO Gets information about the footer of a list-view control. Send this message explicitly or by using the ListView_GetFooterInfo macro.
LVM_GETFOOTERITEM Gets information on a footer item in a list-view control. Send this message explicitly or by using the ListView_GetFooterItem macro.
LVM_GETFOOTERITEMRECT Gets the coordinates of a footer for a specified item in a list-view control. Send this message explicitly or by using the ListView_GetFooterItemRect macro.
LVM_GETFOOTERRECT Retrieves the coordinates of the footer for a list-view control. Send this message explicitly or by using the ListView_GetFooterRect macro.
LVM_GETGROUPCOUNT Gets the number of groups.
LVM_GETGROUPINFO Gets group information.
LVM_GETGROUPINFOBYINDEX Gets information on a specified group. Send this message explicitly or by using the ListView_GetGroupInfoByIndex macro.
LVM_GETGROUPMETRICS Gets information about the display of groups.
LVM_GETGROUPRECT Gets the rectangle for a specified group. Send this message explicitly or by using the ListView_GetGroupRect macro.
LVM_GETGROUPSTATE Gets the state for a specified group. Send this message explicitly or by using the ListView_GetGroupState macro.
LVM_GETHEADER Gets the handle to the header control used by the list-view control. You can send this message explicitly or use the ListView_GetHeader macro.
LVM_GETHOTCURSOR Retrieves the HCURSOR value used when the pointer is over an item while hot tracking is enabled. You can send this message explicitly or use the ListView_GetHotCursor macro.
LVM_GETHOTITEM Retrieves the index of the hot item. You can send this message explicitly or use the ListView_GetHotItem macro.
LVM_GETHOVERTIME Retrieves the amount of time that the mouse cursor must hover over an item before it is selected. You can send this message explicitly or use the ListView_GetHoverTime macro.
LVM_GETIMAGELIST Retrieves the handle to an image list used for drawing list-view items. You can send this message explicitly or by using the ListView_GetImageList macro.
LVM_GETINSERTMARK Retrieves the position of the insertion point.
LVM_GETINSERTMARKCOLOR Retrieves the color of the insertion point.
LVM_GETINSERTMARKRECT Retrieves the rectangle that bounds the insertion point.
LVM_GETISEARCHSTRING Retrieves the incremental search string of a list-view control. You can send this message explicitly or by using the ListView_GetISearchString macro.
LVM_GETITEM Retrieves some or all of a list-view item's attributes. You can send this message explicitly or by using the ListView_GetItem macro.
LVM_GETITEMCOUNT Retrieves the number of items in a list-view control. You can send this message explicitly or by using the ListView_GetItemCount macro.
LVM_GETITEMINDEXRECT Retrieves the bounding rectangle for all or part of a subitem in the current view of a list-view control. Send this message explicitly or by using the ListView_GetItemIndexRect macro.
LVM_GETITEMPOSITION Retrieves the position of a list-view item. You can send this message explicitly or by using the ListView_GetItemPosition macro.
LVM_GETITEMRECT Retrieves the bounding rectangle for all or part of an item in the current view. You can send this message explicitly or by using the ListView_GetItemRect macro.
LVM_GETITEMSPACING Determines the spacing between items in a list-view control. You can send this message explicitly or by using the ListView_GetItemSpacing macro.
LVM_GETITEMSTATE Retrieves the state of a list-view item. You can send this message explicitly or by using the ListView_GetItemState macro.
LVM_GETITEMTEXT Retrieves the text of a list-view item or subitem. You can send this message explicitly or by using the ListView_GetItemText macro.
LVM_GETNEXTITEM Searches for a list-view item that has the specified properties and bears the specified relationship to a specified item. You can send this message explicitly or by using the ListView_GetNextItem macro.
LVM_GETNEXTITEMINDEX Retrieves the index of an item in a specified list-view control that matches the specified properties and relationship to another item. Send this message explicitly or by using the ListView_GetNextItemIndex macro.
LVM_GETNUMBEROFWORKAREAS Retrieves the number of working areas in a list-view control. You can send this message explicitly or use the ListView_GetNumberOfWorkAreas macro.
LVM_GETORIGIN Retrieves the current view origin for a list-view control. You can send this message explicitly or by using the ListView_GetOrigin macro.
LVM_GETOUTLINECOLOR Retrieves the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set.
LVM_GETSELECTEDCOLUMN Retrieves an integer that specifies the selected column.
LVM_GETSELECTEDCOUNT Determines the number of selected items in a list-view control. You can send this message explicitly or by using the ListView_GetSelectedCount macro.
LVM_GETSELECTIONMARK Retrieves the selection mark from a list-view control. You can send this message explicitly or use the ListView_GetSelectionMark macro.
LVM_GETSTRINGWIDTH Determines the width of a specified string using the specified list-view control's current font. You can send this message explicitly or by using the ListView_GetStringWidth macro.
LVM_GETSUBITEMRECT Retrieves information about the bounding rectangle for a subitem in a list-view control. You can send this message explicitly or by using the ListView_GetSubItemRect macro (recommended). This message is intended to be used only with list-view controls that use the LVS_REPORT style.
LVM_GETTEXTBKCOLOR Retrieves the text background color of a list-view control. You can send this message explicitly or by using the ListView_GetTextBkColor macro.
LVM_GETTEXTCOLOR Retrieves the text color of a list-view control. You can send this message explicitly or by using the ListView_GetTextColor macro.
LVM_GETTILEINFO Retrieves information about a tile in a list-view control.
LVM_GETTILEVIEWINFO Retrieves information about a list-view control in tile view.
LVM_GETTOOLTIPS Retrieves the tooltip control that the list-view control uses to display tooltips. You can send this message explicitly or use the ListView_GetToolTips macro.
LVM_GETTOPINDEX Retrieves the index of the topmost visible item when in list or report view. You can send this message explicitly or by using the ListView_GetTopIndex macro.
LVM_GETUNICODEFORMAT Retrieves the UNICODE character format flag for the control. You can send this message explicitly or use the ListView_GetUnicodeFormat macro.
LVM_GETVIEW Retrieves the current view of a list-view control.
LVM_GETVIEWRECT Retrieves the bounding rectangle of all items in the list-view control. The list view must be in icon or small icon view. You can send this message explicitly or by using the ListView_GetViewRect macro.
LVM_GETWORKAREAS Retrieves the working areas from a list-view control. You can send this message explicitly or use the ListView_GetWorkAreas macro.
LVM_HASGROUP Determines whether the list-view control has a specified group.
LVM_HITTEST Determines which list-view item, if any, is at a specified position. You can send this message explicitly or by using the ListView_HitTest macro.
LVM_INSERTCOLUMN Inserts a new column in a list-view control. You can send this message explicitly or by using the ListView_InsertColumn macro.
LVM_INSERTGROUP Inserts a group into a list-view control.
LVM_INSERTGROUPSORTED Inserts a group into an ordered list of groups.
LVM_INSERTITEM Inserts a new item in a list-view control. You can send this message explicitly or by using the ListView_InsertItem macro.
LVM_INSERTMARKHITTEST Retrieves the insertion point closest to a specified point.
LVM_ISGROUPVIEWENABLED Checks whether the list-view control has group view enabled.
LVM_ISITEMVISIBLE Indicates if an item in the list-view control is visible. Send this message explicitly or by using the ListView_IsItemVisible macro.
LVM_MAPIDTOINDEX Maps the ID of an item to an index.
LVM_MAPINDEXTOID Maps the index of an item to a unique ID.
LVM_MOVEGROUP Not implemented.
LVM_MOVEITEMTOGROUP Not implemented.
LVM_REDRAWITEMS Forces a list-view control to redraw a range of items. You can send this message explicitly or by using the ListView_RedrawItems macro.
LVM_REMOVEALLGROUPS Removes all groups from a list-view control.
LVM_REMOVEGROUP Removes a group from a list-view control.
LVM_SCROLL Scrolls the content of a list-view control. You can send this message explicitly or by using the ListView_Scroll macro.
LVM_SETBKCOLOR Sets the background color of a list-view control. You can send this message explicitly or by using the ListView_SetBkColor macro.
LVM_SETBKIMAGE Sets the background image in a list-view control. You can send this message explicitly or by using the ListView_SetBkImage macro.
LVM_SETCALLBACKMASK Changes the callback mask for a list-view control. You can send this message explicitly or by using the ListView_SetCallbackMask macro.
LVM_SETCOLUMN Sets the attributes of a list-view column. You can send this message explicitly or by using the ListView_SetColumn macro.
LVM_SETCOLUMNORDERARRAY Sets the left-to-right order of columns in a list-view control. You can send this message explicitly or use the ListView_SetColumnOrderArray macro.
LVM_SETCOLUMNWIDTH Changes the width of a column in report-view mode or the width of all columns in list-view mode. You can send this message explicitly or use the ListView_SetColumnWidth macro.
LVM_SETEXTENDEDLISTVIEWSTYLE Sets extended styles in list-view controls. You can send this message explicitly or use the ListView_SetExtendedListViewStyle or ListView_SetExtendedListViewStyleEx macro.
LVM_SETGROUPINFO Sets group information.
LVM_SETGROUPMETRICS Sets information about the display of groups.
LVM_SETHOTCURSOR Sets the HCURSOR value that the list-view control uses when the pointer is over an item while hot tracking is enabled. You can send this message explicitly or use the ListView_SetHotCursor macro. To check whether hot tracking is enabled, call SystemParametersInfo.
LVM_SETHOTITEM Sets the hot item for a list-view control. You can send this message explicitly or use the ListView_SetHotItem macro.
LVM_SETHOVERTIME Sets the amount of time which the mouse cursor must hover over an item before it is selected. You can send this message explicitly or use the ListView_SetHoverTime macro.
LVM_SETICONSPACING Sets the spacing between icons in list-view controls that have the LVS_ICON style. You can send this message explicitly or by using the ListView_SetIconSpacing macro.
LVM_SETIMAGELIST Assigns an image list to a list-view control. You can send this message explicitly or by using the ListView_SetImageList macro.
LVM_SETINFOTIP Sets tooltip text.
LVM_SETINSERTMARK Sets the insertion point to the defined position.
LVM_SETINSERTMARKCOLOR Sets the color of the insertion point.
LVM_SETITEM Sets some or all of a list-view item's attributes. You can also send LVM_SETITEM to set the text of a subitem. You can send this message explicitly or by using the ListView_SetItem macro.
LVM_SETITEMCOUNT Causes the list-view control to allocate memory for the specified number of items or sets the virtual number of items in a virtual list-view control. This depends on how the list-view control was created. You can send this message explicitly or use the ListView_SetItemCount or ListView_SetItemCountEx macros.
LVM_SETITEMINDEXSTATE Sets the state of a list-view item. Send this message explicitly or by using the ListView_SetItemIndexState macro.
LVM_SETITEMPOSITION Moves an item to a specified position in a list-view control (must be in icon or small icon view). You can send this message explicitly or by using the ListView_SetItemPosition macro.
LVM_SETITEMPOSITION32 Moves an item to a specified position in a list-view control (must be in icon or small icon view). This message differs from the LVM_SETITEMPOSITION message in that it uses 32-bit coordinates. You can send this message explicitly or by using the ListView_SetItemPosition32 macro.
LVM_SETITEMSTATE Changes the state of an item in a list-view control. You can send this message explicitly or by using the ListView_SetItemState macro.
LVM_SETITEMTEXT Changes the text of a list-view item or subitem. You can send this message explicitly or by using the ListView_SetItemText macro.
LVM_SETOUTLINECOLOR Sets the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set.
LVM_SETSELECTEDCOLUMN Sets the index of the selected column.
LVM_SETSELECTIONMARK Sets the selection mark in a list-view control. You can send this message explicitly or use the ListView_SetSelectionMark macro.
LVM_SETTEXTBKCOLOR Sets the background color of text in a list-view control. You can send this message explicitly or by using the ListView_SetTextBkColor macro.
LVM_SETTEXTCOLOR Sets the text color of a list-view control. You can send this message explicitly or by using the ListView_SetTextColor macro.
LVM_SETTILEINFO Sets information for an existing tile of a list-view control.
LVM_SETTILEVIEWINFO Sets information that a list-view control uses in tile view.
LVM_SETTILEWIDTH Not currently supported.
LVM_SETTOOLTIPS Sets the tooltip control that the list-view control will use to display tooltips. You can send this message explicitly or use the ListView_SetToolTips macro.
LVM_SETUNICODEFORMAT Sets the UNICODE character format flag for the control. This message allows you to change the character set used by the control at run time rather than having to re-create the control. You can send this message explicitly or use the ListView_SetUnicodeFormat macro.
LVM_SETVIEW Sets the view of a list-view control.
LVM_SETWORKAREAS Sets the working areas within a list-view control. You can send this message explicitly or use the ListView_SetWorkAreas macro.
LVM_SORTGROUPS Uses an application-defined comparison function to sort groups by ID within a list-view control.
LVM_SORTITEMS Uses an application-defined comparison function to sort the items of a list-view control. The index of each item changes to reflect the new sequence. You can send this message explicitly or by using the ListView_SortItems macro.
LVM_SORTITEMSEX Uses an application-defined comparison function to sort the items of a list-view control. The index of each item changes to reflect the new sequence. You can send this message explicitly or by using the ListView_SortItemsEx macro.
LVM_SUBITEMHITTEST Determines which list-view item or subitem is at a given position. You can send this message explicitly or by using the ListView_SubItemHitTest macro.
LVM_UPDATE Updates a list-view item. If the list-view control has the LVS_AUTOARRANGE style, this macro causes the list-view control to be arranged. You can send this message explicitly or by using the ListView_Update macro.

Notifications

Topic Contents
LVN_BEGINDRAG Notifies a list-view control's parent window that a drag-and-drop operation involving the left mouse button is being initiated. This notification code is sent in the form of a WM_NOTIFY message.
LVN_BEGINLABELEDIT Notifies a list-view control's parent window about the start of label editing for an item. This notification code is sent in the form of a WM_NOTIFY message.
LVN_BEGINRDRAG Notifies a list-view control's parent window that a drag-and-drop operation involving the right mouse button is being initiated. This notification code is sent in the form of a WM_NOTIFY message.
LVN_BEGINSCROLL Notifies a list-view control's parent window when a scrolling operation starts.
LVN_COLUMNCLICK Notifies a list-view control's parent window that a column was clicked. This notification code is sent in the form of a WM_NOTIFY message.
LVN_COLUMNDROPDOWN Sent by a list-view control when the list-view's drop-down button is pressed. This notification code is sent in the form of a WM_NOTIFY message.
LVN_COLUMNOVERFLOWCLICK Sent by a list-view control when its overflow button is clicked. This notification code is sent in the form of a WM_NOTIFY message.
LVN_DELETEALLITEMS Notifies a list-view control's parent window that all items in the control are about to be deleted. This notification code is sent in the form of a WM_NOTIFY message.
LVN_DELETEITEM Notifies a list-view control's parent window that an item is about to be deleted. This notification code is sent in the form of a WM_NOTIFY message.
LVN_ENDLABELEDIT Notifies a list-view control's parent window about the end of label editing for an item. This notification code is sent in the form of a WM_NOTIFY message.
LVN_ENDSCROLL Notifies a list-view control's parent window when a scrolling operation ends.
LVN_GETDISPINFO Sent by a list-view control to its parent window. It is a request for the parent window to provide information needed to display or sort a list-view item. This notification code is sent in the form of a WM_NOTIFY message.
LVN_GETEMPTYMARKUP Sent by list-view control to its parent window when the control has no items. This notification code is sent in the form of a WM_NOTIFY message. The LVN_GETEMPTYMARKUP notification code is a request for the parent window to provide markup text.
LVN_GETINFOTIP Sent by a large icon view list-view control that has the LVS_EX_INFOTIP extended style. This notification is sent when the list-view control is requesting additional text information to be displayed in a tooltip. It is sent in the form of a WM_NOTIFY message.
LVN_HOTTRACK Sent by a list-view control when the user moves the mouse over an item. This notification is only sent by list-view controls that have the LVS_EX_TRACKSELECT extended list-view style. It is sent in the form of a WM_NOTIFY message.
LVN_INCREMENTALSEARCH Notifies a list-view control's parent window that an incremental search has started. This notification code is sent in the form of a WM_NOTIFY message.
LVN_INSERTITEM Notifies a list-view control's parent window that a new item was inserted. This notification code is sent in the form of a WM_NOTIFY message.
LVN_ITEMACTIVATE Sent by a list-view control when the user activates an item. This notification is sent in the form of a WM_NOTIFY message.
LVN_ITEMCHANGED Notifies a list-view control's parent window that an item has changed. This notification code is sent in the form of a WM_NOTIFY message.
LVN_ITEMCHANGING Notifies a list-view control's parent window that an item is changing. This notification code is sent in the form of a WM_NOTIFY message.
LVN_KEYDOWN Notifies a list-view control's parent window that a key has been pressed. This notification code is sent in the form of a WM_NOTIFY message.
LVN_LINKCLICK Notifies a list-view control's parent window that a link has been clicked on. This notification is sent in the form of a WM_NOTIFY message.
LVN_MARQUEEBEGIN Notifies a list-view control's parent window that a bounding box (marquee) selection has begun. This notification code is sent in the form of a WM_NOTIFY message.
LVN_ODCACHEHINT Sent by a virtual list-view control when the contents of its display area have changed. For example, a list-view control sends this notification when the user scrolls the control's display. The LVN_ODCACHEHINT notification code is sent in the form of a WM_NOTIFY message.
LVN_ODFINDITEM Sent by a virtual list-view control when it needs the owner to find a particular callback item. For example, the control will send this notification when it receives shortcut keyboard input or when it receives an LVM_FINDITEM message.
LVN_ODSTATECHANGED Sent by a list-view control when the state of an item or range of items has changed. This notification is sent in the form of a WM_NOTIFY message.
LVN_SETDISPINFO Notifies a list-view control's parent window that it must update the information it maintains for an item. This notification code is sent in the form of a WM_NOTIFY message.
NM_CLICK (list view) Sent by a list-view control when the user clicks an item with the left mouse button. This notification code is sent in the form of a WM_NOTIFY message.
NM_CUSTOMDRAW (list view) Sent by a list-view control to notify its parent windows about drawing operations. This notification is sent in the form of a WM_NOTIFY message.
NM_DBLCLK (list view) Sent by a list-view control when the user double-clicks an item with the left mouse button. This notification code is sent in the form of a WM_NOTIFY message.
NM_HOVER (list view) Sent by a list-view control when the mouse hovers over an item. This notification code is sent in the form of a WM_NOTIFY message.
NM_KILLFOCUS (list view) Notifies a list-view control's parent window that the control has lost the input focus. NM_KILLFOCUS (list view) is sent in the form of a WM_NOTIFY message.
NM_RCLICK (list view) Sent by a list-view control when the user clicks an item with the right mouse button. This notification code is sent in the form of a WM_NOTIFY message.
NM_RDBLCLK (list view) Sent by a list-view control when the user double-clicks an item with the right mouse button. This notification code is sent in the form of a WM_NOTIFY message.
NM_RELEASEDCAPTURE (list view) Notifies a list-view control's parent window that the control is releasing mouse capture. This notification is sent in the form of a WM_NOTIFY message.
NM_RETURN (list view) Notifies a list-view control's parent window that the control has the input focus and that the user has pressed the ENTER key. NM_RETURN is sent in the form of a WM_NOTIFY message.
NM_SETFOCUS (list view) Notifies a list-view control's parent window that the control has received the input focus. NM_SETFOCUS (list view) is sent in the form of a WM_NOTIFY message.

Structures

Topic Contents
LVBKIMAGE Contains information about the background image of a list-view control. This structure is used for both setting and retrieving background image information.
LVCOLUMN Contains information about a column in report view. This structure is used both for creating and manipulating columns. This structure supersedes the LV_COLUMN structure.
LVFINDINFO Contains information used when searching for a list-view item. This structure is identical to LV_FINDINFO but has been renamed to fit standard naming conventions.
LVFOOTERINFO Contains information on a footer in a list-view control.
LVFOOTERITEM Contains information on a footer item.
LVGROUP Used to set and retrieve groups.
LVGROUPMETRICS Contains information about the display of groups in a list-view control.
LVHITTESTINFO Contains information about a hit test. This structure has been extended to accommodate subitem hit-testing. It is used in association with the LVM_HITTEST and LVM_SUBITEMHITTEST messages and their related macros. This structure supersedes the LVHITTESTINFO structure.
LVINSERTGROUPSORTED Used to sort groups. It is used with LVM_INSERTGROUPSORTED.
LVINSERTMARK Used to describe insertion points.
LVITEM Specifies or receives the attributes of a list-view item. This structure has been updated to support a new mask value (LVIF_INDENT) that enables item indenting. This structure supersedes the LV_ITEM structure.
LVITEMINDEX Contains index information about a list-view item.
LVSETINFOTIP Provides information about tooltip text that is to be set.
LVTILEINFO Provides information about an item in a list-view control when it is displayed in tile view.
LVTILEVIEWINFO Provides information about a list-view control when it is displayed in tile view.
NMITEMACTIVATE Contains information about an LVN_ITEMACTIVATE notification code.
NMLISTVIEW Contains information about a list-view notification code. This structure is the same as the NM_LISTVIEW structure but has been renamed to fit standard naming conventions.
NMLVCACHEHINT Contains information used to update the cached item information for use with a virtual list view.
NMLVCUSTOMDRAW Contains information specific to an NM_CUSTOMDRAW (list view) notification code sent by a list-view control.
NMLVDISPINFO Contains information about an LVN_GETDISPINFO or LVN_SETDISPINFO notification code. This structure is the same as the LV_DISPINFO structure, but has been renamed to fit standard naming conventions.
NMLVEMPTYMARKUP Sent on a LVN_GETEMPTYMARKUP notification.
NMLVFINDITEM Contains information the owner needs to find items requested by a virtual list view control. This structure is used with the LVN_ODFINDITEM notification code.
NMLVGETINFOTIP Contains and receives list-view item information needed to display a tooltip for an item. This structure is used with the LVN_GETINFOTIP notification code.
NMLVKEYDOWN Contains information used in processing the LVN_KEYDOWN notification code. This structure is the same as the NMLVKEYDOWN structure but has been renamed to fit standard naming conventions.
NMLVLINK Contains information about an LVN_LINKCLICK notification.
NMLVODSTATECHANGE Structure that contains information for use in processing the LVN_ODSTATECHANGED notification code.
NMLVSCROLL Provides information about a scrolling operation.

Constants

Topic Contents
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.
List-View Item States An item's state value consists of the item's state, an optional overlay mask index, and an optional state image mask index.
An item's state determines its appearance and functionality. The state can be zero or one or more of the following values:
List-View Window Styles The following window styles are specific to list-view controls.