CListCtrl::GetItemData
TOC
Collapse the table of content
Expand the table of content

CListCtrl::GetItemData

Visual Studio 6.0

CListCtrl::GetItemData

DWORD GetItemData( int nItem ) const;

Return Value

A 32-bit application-specific value associated with the specified item.

Parameters

nItem

Index of the list item whose data is to be retrieved.

Remarks

This function retrieves the 32-bit application-specific value associated with the item specified by nItem. This value is the lParam member of the https://msdn.microsoft.com/en-us/library/bb774760(v=vs.60).aspx structure, as described in the Platform SDK

Example

// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;

// If any item's data is equal to zero then reset it to -1.
for (int i=0;i < pmyListCtrl->GetItemCount();i++)
{
   if (pmyListCtrl->GetItemData(i) == 0)
   {
      pmyListCtrl->SetItemData(i, (DWORD) -1);
   }
}

CListCtrl OverviewClass MembersHierarchy Chart

See Also   CListCtrl::SetItemData

Show:
© 2016 Microsoft