Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Selecting many list view items with a button

Posted on 2004-10-26
1
Medium Priority
?
178 Views
Last Modified: 2013-11-20
I have a list view I would like to be able to select certain items with a button.

The list view contains filenames, and with the click of a button I would like all the files that contain what I'm looking for to be selected and highlighted....

I'm having difficulty with the selection and highlight part of it!

thanks.
0
Comment
Question by:galneweinhaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
Nass89 earned 1000 total points
ID: 12418850
Hi,
First of all set the ListCtrl style to :"Multi Section".
The following codes selects Item 0 to 3:

int i;
      for(i=0; i<4; i++)
      m_MyList.SetItem(i, 0, LVIF_STATE, NULL, 0, LVIS_SELECTED,
      LVIS_SELECTED, 0);

Good Luck!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

598 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