CListCtrl::GetSelectionMark
TOC
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

CListCtrl::GetSelectionMark

Retrieves the selection mark of a list view control.

int GetSelectionMark( );

Return Value

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

Remarks

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

Example

// 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);

See Also

CListCtrl Overview | Class Members | Hierarchy Chart | CListCtrl::SetSelectionMark

Show:
© 2016 Microsoft