?
Solved

CListCtrl selection question

Posted on 2001-06-11
1
Medium Priority
?
2,978 Views
Last Modified: 2013-11-20
Hi,
How do I clear the selection from a CListCtrl control ?

thanks,
Yoav.
0
Comment
Question by:yoavo
1 Comment
 
LVL 2

Accepted Solution

by:
MadYugoslav earned 60 total points
ID: 6177207
CListCtrl* List;
int Item;

while( (Item=List->GetNextItem(-1, LVNI_SELECTED) != -1 )
   List->SetItemState(Item, 0, LVIS_SELECTED);

This will deselect all items;
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Integration Management Part 2
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question