[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 179
  • Last Modified:

Selecting many list view items with a button

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
galneweinhaw
Asked:
galneweinhaw
1 Solution
 
Nass89Commented:
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now