Rediger

Del via


LVM_GETNEXTITEMINDEX message

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.

Parameters

wParam [in, out]

A pointer to the LVITEMINDEX structure for the item to begin the search with, or -1 to find the first item that matches the specified flags. The calling process is responsible for allocating this structure and setting its members.

lParam

Specifies the relationship to the item listed in parameter wParam. This can be one or a combination of the following values:

Value Meaning
Searches by index.
LVNI_ALL
Searches for a subsequent item by index, the default value.
Searches by physical relationship to the index of the item where the search is to begin.
LVNI_ABOVE
Searches for an item that is above the specified item.
LVNI_BELOW
Searches for an item that is below the specified item.
LVNI_TOLEFT
Searches for an item to the left of the specified item.
LVNI_PREVIOUS
Windows Vista and later: Searches for an item that is ordered before the item specified in wParam. The LVNI_PREVIOUS flag is not directional (LVNI_ABOVE will find the item positioned above, while LVNI_PREVIOUS will find the item ordered before.) The LVNI_PREVIOUS flag basically reverses the logic of the search performed by the LVM_GETNEXTITEM or LVM_GETNEXTITEMINDEX messages.
LVNI_TORIGHT
Searches for an item to the right of the specified item.
LVNI_DIRECTIONMASK
Windows Vista and later: A directional flag mask with value as follows: LVNI_ABOVE | LVNI_BELOW | LVNI_TOLEFT | LVNI_TORIGHT.
The state of the item to find can be specified with one or a combination of the following values:
LVNI_CUT
The item has the LVIS_CUT state flag set.
LVNI_DROPHILITED
The item has the LVIS_DROPHILITED state flag set
LVNI_FOCUSED
The item has the LVIS_FOCUSED state flag set.
LVNI_SELECTED
The item has the LVIS_SELECTED state flag set.
LVNI_STATEMASK
Windows Vista and later: A state flag mask with value as follows: LVNI_FOCUSED | LVNI_SELECTED | LVNI_CUT | LVNI_DROPHILITED.
Searches by appearance of items or by group.
LVNI_VISIBLEORDER
Windows Vista and later: Search the visible order.
LVNI_VISIBLEONLY
Windows Vista and later: Search the visible items.
LVNI_SAMEGROUPONLY
Windows Vista and later: Search the current group.
If an item does not have all of the specified state flags set, the search continues with the next item.

Return value

Returns TRUE if successful, or FALSE otherwise.

Remarks

Note that the following flags, for use only with Windows Vista, are mutually exclusive of any other flags in use: LVNI_PREVIOUS, LVNI_VISIBLEONLY, LVNI_SAMEGROUPONLY, LVNI_VISIBLEORDER, LVNI_DIRECTIONMASK, and LVNI_STATEMASK.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Commctrl.h

See also

LVM_GETNEXTITEM