Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. a problem about CListCtrl

a problem about CListCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benben
    wrote on last edited by
    #1

    Hi: In ClistCtrl,I want to change the icon of some item.And I try : m_ctrlListDevice.SetItem(nItem,0,0,NULL,1,0,0,0); but nothing happen.The icon isn't changed. Why? How could I do to change the icon? Thanks Benben

    D 1 Reply Last reply
    0
    • B benben

      Hi: In ClistCtrl,I want to change the icon of some item.And I try : m_ctrlListDevice.SetItem(nItem,0,0,NULL,1,0,0,0); but nothing happen.The icon isn't changed. Why? How could I do to change the icon? Thanks Benben

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Shouldn't it be:

      m_ctrlListDevice.SetItem(nItem, 0, LVIF_IMAGE, "", 1, 0, 0, 0);

      This assumes, of course, that m_ctrlListDevice.SetImageList() has been previously called and that at least two images exist in the list.


      Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

      B 1 Reply Last reply
      0
      • D David Crow

        Shouldn't it be:

        m_ctrlListDevice.SetItem(nItem, 0, LVIF_IMAGE, "", 1, 0, 0, 0);

        This assumes, of course, that m_ctrlListDevice.SetImageList() has been previously called and that at least two images exist in the list.


        Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

        B Offline
        B Offline
        benben
        wrote on last edited by
        #3

        Thanks.MSDN doesn't tell me this clearly. Thanks Benben

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups