Export (0) Print
Expand All
MFC
Expand Minimize

CListCtrl::GetSelectionMark 

Retrieves the selection mark of a list view control.


int GetSelectionMark( );

The zero-based selection mark, or -1 if there is no selection mark.

This member function implements the behavior of the Win32 macro, ListView_GetSelectionMark, as described in the Platform SDK.

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

// Set the selection mark to the first item only if no other item is 
// selected.
if (pmyListCtrl->GetSelectionMark() == -1)
      pmyListCtrl->SetSelectionMark(0);

Community Additions

ADD
Show:
© 2014 Microsoft