List-View Control Reference
This section contains information about the programming elements used with list-view controls.
Overviews
A list-view control is a window that displays a collection of items; each item consists of an icon and a label.
Macros
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.
Arranges items in icon view. You can use this macro or send the LVM_ARRANGE message explicitly.
Cancels an item text editing operation. You can use this macro or send the LVM_CANCELEDITLABEL message explicitly.
Creates a drag image list for the specified item. You can use this macro or send the LVM_CREATEDRAGIMAGE message explicitly.
Removes all items from a list-view control. You can use this macro or send the LVM_DELETEALLITEMS message explicitly.
Removes a column from a list-view control. You can use this macro or send the LVM_DELETECOLUMN message explicitly.
Removes an item from a list-view control. You can use this macro or send the LVM_DELETEITEM message explicitly.
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.
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.
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.
Searches for a list-view item with the specified characteristics. You can use this macro or send the LVM_FINDITEM message explicitly.
Retrieves the background color of a list-view control. You can use this macro or send the LVM_GETBKCOLOR message explicitly.
Retrieves the background image in a list-view control. You can use this macro or send the LVM_GETBKIMAGE message explicitly.
Retrieves the callback mask for a list-view control. You can use this macro or send the LVM_GETCALLBACKMASK message explicitly.
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.
Retrieves the attributes of a list-view control's column. You can use this macro or send the LVM_GETCOLUMN message explicitly.
Retrieves 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.
Retrieves the width of a column in report or list view. You can use this macro or send the LVM_GETCOLUMNWIDTH message explicitly.
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.
Retrieves 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_GetExtendedListViewStyle
Retrieves 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.
Retrieves group information. You can use this macro or send the LVM_GETGROUPINFO message explicitly.
Retrieves the metrics of a group. You can use this macro or send the LVM_GETGROUPMETRICS message explicitly.
Retrieves the handle to the header control used by a list-view control. You can use this macro or send the LVM_GETHEADER message explicitly.
Retrieves 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.
Retrieves the index of the hot item. You can use this macro or send the LVM_GETHOTITEM message explicitly.
Retrieves 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.
Retrieves the handle to an image list used for drawing list-view items. You can use this macro or send the LVM_GETIMAGELIST message explicitly.
Retrieves the position of the insertion point. You can use this macro or send the LVM_GETINSERTMARK message explicitly.
Retrieves the color of the insertion point. You can use this macro or send the LVM_GETINSERTMARKCOLOR message explicitly.
Retrieves the rectangle that bounds the insertion point. You can use this macro or send the LVM_GETINSERTMARKRECT message explicitly.
Retrieves the incremental search string of a list-view control. You can use this macro or send the LVM_GETISEARCHSTRING message explicitly.
Retrieves some or all of a list-view item's attributes. You can use this macro or send the LVM_GETITEM message explicitly.
Retrieves the number of items in a list-view control. You can use this macro or send the LVM_GETITEMCOUNT message explicitly.
Retrieves the position of a list-view item. You can use this macro or explicitly send the LVM_GETITEMPOSITION message.
Retrieves 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.
Determines the spacing between items in a list-view control. You can use this macro or send the LVM_GETITEMSPACING message explicitly.
Retrieves the state of a list-view item. You can use this macro or send the LVM_GETITEMSTATE message explicitly.
Retrieves the text of a list-view item or subitem. You can use this macro or send the LVM_GETITEMTEXT message explicitly.
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.
Retrieves the number of working areas in a list-view control. You can use this macro or send the LVM_GETNUMBEROFWORKAREAS message explicitly.
Retrieves the current view origin for a list-view control. You can use this macro or send the LVM_GETORIGIN message explicitly.
Retrieves 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.
Retrieves an integer that specifies the selected column. You can use this macro or send the LVM_GETSELECTEDCOLUMN message explicitly.
Determines the number of selected items in a list-view control. You can use this macro or send the LVM_GETSELECTEDCOUNT message explicitly.
Retrieves the selection mark from a list-view control. You can use this macro or explicitly send the LVM_GETSELECTIONMARK message.
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.
Retrieves 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.
Retrieves the text background color of a list-view control. You can use this macro or send the LVM_GETTEXTBKCOLOR message explicitly.
Retrieves the text color of a list-view control. You can use this macro or send the LVM_GETTEXTCOLOR message explicitly.
Retrieves information about a tile in a list-view control. You can use this macro or send the LVM_GETTILEINFO message explicitly.
Retrieves information about a list-view control in tile view. You can use this macro or send the LVM_GETTILEVIEWINFO message explicitly.
Retrieves the ToolTip control that the list-view control uses to display ToolTips. You can use this macro or send the LVM_GETTOOLTIPS message explicitly.
Retrieves 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.
Retrieves the Unicode character format flag for the control. You can use this macro or send the LVM_GETUNICODEFORMAT message explicitly.
Retrieves the current view of a list-view control. You can use this macro or send the LVM_GETVIEW message explicitly.
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 use this macro or send the LVM_GETVIEWRECT message explicitly.
Retrieves the working areas from a list-view control. You can use this macro, or send the LVM_GETWORKAREAS message explicitly.
Determines whether the list-view control has a specified group. You can use this macro or send the LVM_HASGROUP message explicitly.
Determines which list-view item, if any, is at a specified position. You can use this macro or send the LVM_HITTEST message explicitly.
Inserts a new column in a list-view control. You can use this macro or send the LVM_INSERTCOLUMN message explicitly.
Inserts a group into a list-view control. You can use this macro or send the LVM_INSERTGROUP message explicitly.
Inserts a group into an ordered list of groups. You can use this macro or send the LVM_INSERTGROUPSORTED message explicitly.
Inserts a new item in a list-view control. You can use this macro or send the LVM_INSERTITEM message explicitly.
Retrieves the insertion point closest to a specified point. You can use this macro or send the LVM_INSERTMARKHITTEST message explicitly.
Checks whether the list-view control has group view enabled. You can use this macro or send the LVM_ISGROUPVIEWENABLED message explicitly.
Maps the identifier (ID) of an item to an index. You can use this macro or send the LVM_MAPIDTOINDEX message explicitly.
Maps the index of an item to a unique ID. You can use this macro or send the LVM_MAPINDEXTOID message explicitly.
Moves the group to the specified zero based index. You can use this macro or send the LVM_MOVEGROUP message explicitly.
Moves an item specified by an index into a group. You can use this macro or send the LVM_MOVEITEMTOGROUP message explicitly.
Forces a list-view control to redraw a range of items. You can use this macro or send the LVM_REDRAWITEMS message explicitly.
Removes all groups from a list-view control. You can use this macro or send the LVM_REMOVEALLGROUPS message explicitly.
Removes a group from a list-view control. You can use this macro or send the LVM_REMOVEGROUP message explicitly.
Scrolls the content of a list-view control. You can use this macro or send the LVM_SCROLL message explicitly.
Sets the background color of a list-view control. You can use this macro or send the LVM_SETBKCOLOR message explicitly.
Sets the background image in a list-view control. You can use this macro or send the LVM_SETBKIMAGE message explicitly.
Changes the callback mask for a list-view control. You can use this macro or send the LVM_SETCALLBACKMASK message explicitly.
Used to select or deselect an item in a list-view control. You can use this macro or send the LVM_SETITEMSTATE message explicitly.
Sets the attributes of a list-view column. You can use this macro or send the LVM_SETCOLUMN message explicitly.
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.
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.
Sets group information. You can use this macro or send the LVM_SETGROUPINFO message explicitly.
Sets the metrics of a group. You can use this macro or send the LVM_SETGROUPMETRICS message explicitly.
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 or not hot tracking is enabled, call SystemParametersInfo.
Sets the hot item in a list-view control. You can use this macro or send the LVM_SETHOTITEM message explicitly.
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.
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.
Assigns an image list to a list-view control. You can use this macro or send the LVM_SETIMAGELIST message explicitly.
Sets tooltip text. You can use this macro or send the LVM_SETINFOTIP message explicitly.
Sets the insertion point to the defined position. You can use this macro or send the LVM_SETINSERTMARK message explicitly.
Sets the color of the insertion point. You can use this macro or send the LVM_SETINSERTMARKCOLOR message explicitly.
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.
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.
Sets the virtual number of items in a virtual list view. You can use this macro or send the LVM_SETITEMCOUNT message explicitly.
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.
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.
Changes the state of an item in a list-view control. You can use this macro or send the LVM_SETITEMSTATE message explicitly.
Changes the text of a list-view item or subitem. You can use this macro or send the LVM_SETITEMTEXT message explicitly.
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.
Sets the index of the selected column. You can use this macro or send the LVM_SETSELECTEDCOLUMN message explicitly.
Sets the selection mark in a list-view control. You can use this macro or send the LVM_SETSELECTIONMARK message explicitly.
Sets the background color of text in a list-view control. You can use this macro or send the LVM_SETTEXTBKCOLOR message explicitly.
Sets the text color of a list-view control. You can use this macro or send the LVM_SETTEXTCOLOR message explicitly.
Sets information for a tile of a list-view control. You can use this macro or send the LVM_SETTILEINFO message explicitly.
Sets information that a list-view control uses in tile view. You can use this macro or send the LVM_SETTILEVIEWINFO message explicitly.
Not currently supported.
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.
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.
Sets the view of a list-view control. You can use this macro or send the LVM_SETVIEW message explicitly.
Sets the working area within a list-view control. You can use this macro or send the LVM_SETWORKAREAS message explicitly.
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.
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.
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.
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.
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
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.
Arranges items in icon view. You can send this message explicitly or by using the ListView_Arrange macro.
Cancels an item text editing operation.
Creates a drag image list for the specified item. You can send this message explicitly or by using the ListView_CreateDragImage macro.
Removes all items from a list-view control. You can send this message explicitly or by using the ListView_DeleteAllItems macro.
Removes a column from a list-view control. You can send this message explicitly or by using the ListView_DeleteColumn macro.
Removes an item from a list-view control. You can send this message explicitly or by using the ListView_DeleteItem macro.
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.
Enables or disables whether the items in a list-view control display as a group.
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.
Searches for a list-view item with the specified characteristics. You can send this message explicitly or by using the ListView_FindItem macro.
Retrieves the background color of a list-view control. You can send this message explicitly or by using the ListView_GetBkColor macro.
Retrieves the background image in a list-view control. You can send this message explicitly or by using the ListView_GetBkImage macro.
Retrieves the callback mask for a list-view control. You can send this message explicitly or by using the ListView_GetCallbackMask macro.
Retrieves the attributes of a list-view control's column. You can send this message explicitly or by using the ListView_GetColumn macro.
Retrieves 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.
Retrieves the width of a column in report or list view. You can send this message explicitly or by using the ListView_GetColumnWidth macro.
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.
Retrieves 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.
Retrieves 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.
Retrieves group information.
Retrieves the metrics of a group.
Retrieves the handle to the header control used by the list-view control. You can send this message explicitly or use the ListView_GetHeader macro.
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.
Retrieves the index of the hot item. You can send this message explicitly or use the ListView_GetHotItem macro.
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.
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.
Retrieves the position of the insertion point.
Retrieves the color of the insertion point.
Retrieves the rectangle that bounds the insertion point.
Retrieves the incremental search string of a list-view control. You can send this message explicitly or by using the ListView_GetISearchString macro.
Retrieves some or all of a list-view item's attributes. You can send this message explicitly or by using the ListView_GetItem macro.
Retrieves the number of items in a list-view control. You can send this message explicitly or by using the ListView_GetItemCount macro.
Retrieves the position of a list-view item. You can send this message explicitly or by using the ListView_GetItemPosition macro.
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.
Determines the spacing between items in a list-view control. You can send this message explicitly or by using the ListView_GetItemSpacing macro.
Retrieves the state of a list-view item. You can send this message explicitly or by using the ListView_GetItemState macro.
Retrieves the text of a list-view item or subitem. You can send this message explicitly or by using the ListView_GetItemText macro.
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.
Retrieves the number of List-View Working Areas in a list-view control. You can send this message explicitly or use the ListView_GetNumberOfWorkAreas macro.
Retrieves the current view origin for a list-view control. You can send this message explicitly or by using the ListView_GetOrigin macro.
Retrieves the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set.
Retrieves an integer that specifies the selected column.
Determines the number of selected items in a list-view control. You can send this message explicitly or by using the ListView_GetSelectedCount macro.
Retrieves the selection mark from a list-view control. You can send this message explicitly or use the ListView_GetSelectionMark macro.
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.
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.
Retrieves the text background color of a list-view control. You can send this message explicitly or by using the ListView_GetTextBkColor macro.
Retrieves the text color of a list-view control. You can send this message explicitly or by using the ListView_GetTextColor macro.
Retrieves information about a tile in a list-view control.
Retrieves information about a list-view control in tile view.
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.
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.
Retrieves the UNICODE character format flag for the control. You can send this message explicitly or use the ListView_GetUnicodeFormat macro.
Retrieves the current view of a list-view control.
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.
Retrieves the working areas from a list-view control. You can send this message explicitly or use the ListView_GetWorkAreas macro.
Determines whether the list-view control has a specified group.
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.
Inserts a new column in a list-view control. You can send this message explicitly or by using the ListView_InsertColumn macro.
Inserts a group into a list-view control.
Inserts a group into an ordered list of groups.
Inserts a new item in a list-view control. You can send this message explicitly or by using the ListView_InsertItem macro.
Retrieves the insertion point closest to a specified point.
Checks whether the list-view control has group view enabled.
Maps the ID of an item to an index.
Maps the index of an item to a unique ID.
Moves the group to the specified zero based index.
Moves an item specified by an index into a group.
Forces a list-view control to redraw a range of items. You can send this message explicitly or by using the ListView_RedrawItems macro.
Removes all groups from a list-view control.
Removes a group from a list-view control.
Scrolls the content of a list-view control. You can send this message explicitly or by using the ListView_Scroll macro.
Sets the background color of a list-view control. You can send this message explicitly or by using the ListView_SetBkColor macro.
Sets the background image in a list-view control. You can send this message explicitly or by using the ListView_SetBkImage macro.
Changes the callback mask for a list-view control. You can send this message explicitly or by using the ListView_SetCallbackMask macro.
Sets the attributes of a list-view column. You can send this message explicitly or by using the ListView_SetColumn macro.
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.
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.
Sets extended styles in list-view controls. You can send this message explicitly or use the ListView_SetExtendedListViewStyle or ListView_SetExtendedListViewStyleEx macro.
Sets group information.
Sets the metrics of a group.
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 or not hot tracking is enabled, call SystemParametersInfo.
Sets the hot item for a list-view control. You can send this message explicitly or use the ListView_SetHotItem macro.
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.
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.
Assigns an image list to a list-view control. You can send this message explicitly or by using the ListView_SetImageList macro.
Sets ToolTip text.
Sets the insertion point to the defined position.
Sets the color of the insertion point.
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.
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.
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.
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.
Changes the state of an item in a list-view control. You can send this message explicitly or by using the ListView_SetItemState macro.
Changes the text of a list-view item or subitem. You can send this message explicitly or by using the ListView_SetItemText macro.
Sets the color of the border of a list-view control if the LVS_EX_BORDERSELECT extended window style is set.
Sets the index of the selected column.
Sets the selection mark in a list-view control. You can send this message explicitly or use the ListView_SetSelectionMark macro.
Sets the background color of text in a list-view control. You can send this message explicitly or by using the ListView_SetTextBkColor macro.
Sets the text color of a list-view control. You can send this message explicitly or by using the ListView_SetTextColor macro.
Sets information for a tile of a list-view control.
Sets information that a list-view control uses in tile view.
Not currently supported.
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.
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.
Sets the view of a list-view control.
Sets the working areas within a list-view control. You can send this message explicitly or use the ListView_SetWorkAreas macro.
Uses an application-defined comparison function to sort groups by ID within a list-view control.
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.
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.
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.
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
Notifies a list-view control's parent window that a drag-and-drop operation involving the left mouse button is being initiated. This notification message is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window about the start of label editing for an item. This notification message is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window that a drag-and-drop operation involving the right mouse button is being initiated. This notification message is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window when a scrolling operation starts.
Notifies a list-view control's parent window that a column was clicked. This notification message is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window that all items in the control are about to be deleted. This notification message is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window that an item is about to be deleted. This notification message is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window about the end of label editing for an item. This notification message is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window when a scrolling operation ends.
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 message is sent in the form of a WM_NOTIFY message.
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.
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.
Notifies a list-view control's parent window that a new item was inserted. This notification message is sent in the form of a WM_NOTIFY message.
Sent by a list-view control when the user activates an item. This notification is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window that an item has changed. This notification message is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window that an item is changing. This notification message is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window that a key has been pressed. This notification message is sent in the form of a WM_NOTIFY message.
Notifies a list-view control's parent window that a bounding box (marquee) selection has begun. This notification message is sent in the form of a WM_NOTIFY message.
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 message is sent in the form of a WM_NOTIFY message.
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.
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.
Notifies a list-view control's parent window that it must update the information it maintains for an item. This notification message is sent in the form of a WM_NOTIFY message.
Sent by a list-view control when the user clicks an item with the left mouse button. This notification message is sent in the form of a WM_NOTIFY message.
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.
Sent by a list-view control when the user double-clicks an item with the left mouse button. This notification message is sent in the form of a WM_NOTIFY message.
Sent by a list-view control when the mouse hovers over an item. This notification message is sent in the form of a WM_NOTIFY message.
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.
Sent by a list-view control when the user clicks an item with the right mouse button. This notification message is sent in the form of a WM_NOTIFY message.
Sent by a list-view control when the user double-clicks an item with the right mouse button. This notification message 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.
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.
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
Contains information about the background image of a list-view control. This structure is used for both setting and retrieving background image information.
Contains information about a column in report view. This structure is used both for creating and manipulating columns. This structure supersedes the LVCOLUMN structure.
Contains information used when searching for a list-view item. This structure is identical to LVFINDINFO but has been renamed to fit standard naming conventions.
Used to set and retrieve groups.
Used to retrieve or set group metrics.
Has been extended to accommodate subitem hit-testing. The LVHITTESTINFO structure contains information about a hit test. It is used in association with the LVM_HITTEST and LVM_SUBITEMHITTEST messages and their related macros. This structure supersedes the LVHITTESTINFO structure.
Used to sort groups. It is used with LVM_INSERTGROUPSORTED.
Used to describe insertion points.
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.
Provides information about tooltip text that is to be set.
Provides information about an item in a list-view control when it is displayed in tile view.
Provides information about a list-view control when it is displayed in tile view.
Contains information about an LVN_ITEMACTIVATE notification message.
Contains information about a list-view notification message. This structure is the same as the NM_LISTVIEW structure but has been renamed to fit standard naming conventions.
Contains information used to update the cached item information for use with a virtual list view.
Contains information specific to an NM_CUSTOMDRAW (list view) notification message sent by a list-view control.
Contains information about an LVN_GETDISPINFO or LVN_SETDISPINFO notification message. This structure is the same as the LV_DISPINFO structure, but has been renamed to fit standard naming conventions.
Contains information the owner needs to find items requested by a virtual list view control. This structure is used with the LVN_ODFINDITEM notification message.
Contains and receives list-view item information needed to display a ToolTip for an item. This structure is used with the LVN_GETINFOTIP notification message.
Contains information used in processing the LVN_KEYDOWN notification message. This structure is the same as the NMLVKEYDOWN structure but has been renamed to fit standard naming conventions.
Structure that contains information for use in processing the LVN_ODSTATECHANGED notification message.
Provides information about a scrolling operation.
Constants
List-view control styles have been extended. To employ these new styles, use the LVM_SETEXTENDEDLISTVIEWSTYLE message or one of the ListView_SetExtendedListViewStyle or ListView_SetExtendedListViewStyleEx macros.
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:
The following window styles are specific to list-view controls.