CListCtrl::GetNextItemIndex

Retrieves the index of the item in the current list-view control that has a specified set of properties.

BOOL GetNextItemIndex(
     PLVITEMINDEX pItemIndex, 
     int nFlags
) const;

Parameters

Parameter

Description

[in, out] pItemIndex

Pointer to the LVITEMINDEX structure that describes the item where the search begins, or -1 to find the first item that matches the flags in the nFlags parameter.

If this method is successful, the LVITEMINDEX structure describes the item found by the search.

[in] nFlags

A bitwise combination (OR) of flags that specify how to perform the search.

The search can depend on the index, state, or appearance of the target item, or the target item's physical position relative to the item specified by the pItemIndex parameter. For more information, see the flags parameter in the LVM_GETNEXTITEMINDEX message.

Return Value

true if this method is successful; otherwise, false.

Remarks

The caller is responsible for allocating and setting the members of the LVITEMINDEX structure pointed to by the pItemIndex parameter.

This method sends the LVM_GETNEXTITEMINDEX message, which is described in the Windows SDK.

Requirements

Header: afxcmn.h

This control is supported in Windows Vista and later.

Additional requirements for this method are described in Build Requirements for Windows Vista Common Controls.

See Also

Reference

CListCtrl Class

Hierarchy Chart

LVM_GETNEXTITEMINDEX

LVITEMINDEX

Other Resources

CListCtrl Members