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. Multiple selection in CListCtrl??

Multiple selection in CListCtrl??

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

    Hello, i need to copy multiple selection to clipboard from my CListCtrl. Now is that ctrl+c copy only the first selected item from my CListCtrl, but not the rest! How to catch ctrl+c key's??? thanks for any help! Arrin!

    H 1 Reply Last reply
    0
    • A Arrin

      Hello, i need to copy multiple selection to clipboard from my CListCtrl. Now is that ctrl+c copy only the first selected item from my CListCtrl, but not the rest! How to catch ctrl+c key's??? thanks for any help! Arrin!

      H Offline
      H Offline
      Hans Dietrich
      wrote on last edited by
      #2

      You can derive your own CMyListCtrl from CListCtrl and handle the WM_KEYDOWN or WM_CHAR messages. Then loop over the selected rows and accumulate them in a CString variable, appending CR/LF to each row (maybe also putting a TAB between columns). Finally, copy the CString variable to the clipboard.

      Best wishes, Hans


      [Hans Dietrich Software]

      A 1 Reply Last reply
      0
      • H Hans Dietrich

        You can derive your own CMyListCtrl from CListCtrl and handle the WM_KEYDOWN or WM_CHAR messages. Then loop over the selected rows and accumulate them in a CString variable, appending CR/LF to each row (maybe also putting a TAB between columns). Finally, copy the CString variable to the clipboard.

        Best wishes, Hans


        [Hans Dietrich Software]

        A Offline
        A Offline
        Arrin
        wrote on last edited by
        #3

        Hello, sorry for late answer, thanks for help! Your idea works! Regards Arrin

        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