Thread: icons in a list view

  1. #1
    Registered User KurtSurge's Avatar
    Join Date
    Aug 2003
    Posts
    25

    icons in a list view

    Can anyone tell me how i can assign icons in an HIMAGELIST to specific items in a listview control? Thanks in advance.

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Here's an old, tired example.

    Here's an msdn example.

    At its simplest, associate the imagelist with the listview with ListView_SetImageList
    and use LVM_INSERTITEM to associate the image index with a specific listview item.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User KurtSurge's Avatar
    Join Date
    Aug 2003
    Posts
    25
    Thanks Ken, you answered my question perfectly. Only that made me realize that I had another problem. I was originally getting the icons from Shel32.dll, but after I got the icons to display i realized these were the wrong icons. The icons i'm trying to get are the file type icons, for example the can and paintbrushes for a bitmap. Can anyone tell me where i can find these files?
    It's too bad that stupidity isn't painful
    --Anton Szandor LaVey

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    I'm not sure but I imagine those resources would be in mspaint.exe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 26
    Last Post: 07-05-2010, 10:43 AM
  2. Unknown memory leak with linked lists...
    By RaDeuX in forum C Programming
    Replies: 6
    Last Post: 12-07-2008, 04:09 AM
  3. List View problem
    By pinkcheese in forum Windows Programming
    Replies: 1
    Last Post: 02-18-2003, 02:09 PM
  4. List class
    By SilasP in forum C++ Programming
    Replies: 0
    Last Post: 02-10-2002, 05:20 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM