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. selecting a row in a List Control

selecting a row in a List Control

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
2 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.
  • M Offline
    M Offline
    Megastoffel
    wrote on last edited by
    #1

    I want to select a row in a List Control and then delete it by pressing a deletebutton in my dialog based program. How do I do that? Please help me, I tried so many things but it doesn't work!

    V 1 Reply Last reply
    0
    • M Megastoffel

      I want to select a row in a List Control and then delete it by pressing a deletebutton in my dialog based program. How do I do that? Please help me, I tried so many things but it doesn't work!

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      One solution is to first determine what rows are selected. When the user presses a button, look through the selected item database and call DeleteItem(). Keep a count as you delete each item and subtract the item index in the database from the count. One reason is because as you delete an item, the the indices of items after the deleted item decreases by one. Kuphryn

      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