Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Syntax
BOOL ListView_GetNextItemIndex(
[in] HWND hwnd,
[in, out] LVITEMINDEX *plvii,
LPARAM flags
);
Parameters
[in] hwnd
Type: HWND
A handle to the list-view control.
[in, out] plvii
Type: LVITEMINDEX*
A pointer to the LVITEMINDEX structure with which the item begins the search, 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.
flags
Type: LPARAM
The relationship to the item specified in parameter plvii. This can be one or a combination of the following values:
Value | Meaning |
---|---|
|
|
|
Searches for a subsequent item by index, the default value. |
|
|
|
Searches for an item that is above the specified item. |
|
Searches for an item that is below the specified item. |
|
Searches for an item to the left of the specified item. |
|
Windows Vista and later: Searches for the item that is previous to the specified item. 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 essentially reverses the logic of the search performed via the LVM_GETNEXTITEM or LVM_GETNEXTITEMINDEX messages. |
|
Searches for an item to the right of the specified item. |
|
Windows Vista and later: A directional flag mask with value as follows: LVNI_ABOVE | LVNI_BELOW | LVNI_TOLEFT | LVNI_TORIGHT. |
|
|
|
The item has the LVIS_CUT state flag set. |
|
The item has the LVIS_DROPHILITED state flag set |
|
The item has the LVIS_FOCUSED state flag set. |
|
The item has the LVIS_SELECTED state flag set. |
|
Windows Vista and later: A state flag mask with value as follows: LVNI_FOCUSED | LVNI_SELECTED | LVNI_CUT | LVNI_DROPHILITED. |
|
|
|
Windows Vista and later: Search the visible order. |
|
Windows Vista and later: Search the visible items. |
|
Windows Vista and later: Search the current group. |
|
Return value
Type: BOOL
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] |
Target Platform | Windows |
Header | commctrl.h |