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. Editing CListCtrl item

Editing CListCtrl item

Scheduled Pinned Locked Moved C / C++ / MFC
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.
  • K Offline
    K Offline
    Ken Goguen
    wrote on last edited by
    #1

    I have a simple CListCtrl that allows the user to edit the item (0). To do this the user needs to click on the item once or twice to get into "Edit" mode. Is there a way to allow the user other ways to get into edit mode? Like pressing the right arrow key (VK_RIGHT) or something? -kg Ken Goguen

    J 1 Reply Last reply
    0
    • J Joaquin M Lopez Munoz

      Sure, you can use something like this in the appropriate handler:

      int nItem=m_list.GetNextItem(-1,LVNI_SELECTED);
      if(nItem>=0){
      GotoDlgCtrl(&m_list); // security measure, may not be necessary
      m_list.EditLabel(nItem);
      }

      Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

      K Offline
      K Offline
      Ken Goguen
      wrote on last edited by
      #2

      Sometimes we over look the simple things. Thanks. -kg Ken Goguen

      1 Reply Last reply
      0
      • K Ken Goguen

        I have a simple CListCtrl that allows the user to edit the item (0). To do this the user needs to click on the item once or twice to get into "Edit" mode. Is there a way to allow the user other ways to get into edit mode? Like pressing the right arrow key (VK_RIGHT) or something? -kg Ken Goguen

        J Offline
        J Offline
        Joaquin M Lopez Munoz
        wrote on last edited by
        #3

        Sure, you can use something like this in the appropriate handler:

        int nItem=m_list.GetNextItem(-1,LVNI_SELECTED);
        if(nItem>=0){
        GotoDlgCtrl(&m_list); // security measure, may not be necessary
        m_list.EditLabel(nItem);
        }

        Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        K 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