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. Check box in column header of a CListCtrl.

Check box in column header of a CListCtrl.

Scheduled Pinned Locked Moved C / C++ / MFC
help
7 Posts 4 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.
  • P Offline
    P Offline
    Paresh Chitte
    wrote on last edited by
    #1

    Hi, I am using a CListCtrl with check boxes for the row (using LVS_EX_CHECKBOXES). Now, my requirement is to use check box in column header of the CListCtrl so that I can "Select All" or "Deselect All" items in list on a single click. Any help would be appreciated. Regards, Paresh.

    J _ P 3 Replies Last reply
    0
    • P Paresh Chitte

      Hi, I am using a CListCtrl with check boxes for the row (using LVS_EX_CHECKBOXES). Now, my requirement is to use check box in column header of the CListCtrl so that I can "Select All" or "Deselect All" items in list on a single click. Any help would be appreciated. Regards, Paresh.

      J Offline
      J Offline
      josip cagalj
      wrote on last edited by
      #2

      Don't mind me, but I do that by placing a button control just under CListCtrl and I place icon (looking like checked box) on it and add some code on 'OnClick' member where I loop through list and set each row as checked. Add another icon button for deselecting all rows. Glad if I could help!

      P 1 Reply Last reply
      0
      • P Paresh Chitte

        Hi, I am using a CListCtrl with check boxes for the row (using LVS_EX_CHECKBOXES). Now, my requirement is to use check box in column header of the CListCtrl so that I can "Select All" or "Deselect All" items in list on a single click. Any help would be appreciated. Regards, Paresh.

        _ Offline
        _ Offline
        _AnsHUMAN_
        wrote on last edited by
        #3

        See Here[^]

        Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

        P 1 Reply Last reply
        0
        • J josip cagalj

          Don't mind me, but I do that by placing a button control just under CListCtrl and I place icon (looking like checked box) on it and add some code on 'OnClick' member where I loop through list and set each row as checked. Add another icon button for deselecting all rows. Glad if I could help!

          P Offline
          P Offline
          Paresh Chitte
          wrote on last edited by
          #4

          Thanks for your prompt reply. I am seeking an easier solution for this. Regards, Paresh.

          D 1 Reply Last reply
          0
          • _ _AnsHUMAN_

            See Here[^]

            Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

            P Offline
            P Offline
            Paresh Chitte
            wrote on last edited by
            #5

            Thanks for your prompt reply. Regards, Paresh.

            1 Reply Last reply
            0
            • P Paresh Chitte

              Thanks for your prompt reply. I am seeking an easier solution for this. Regards, Paresh.

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

              Paresh Chitte wrote:

              I am seeking an easier solution for this.

              What's hard about that? It seemed easy and straight forward to me.


              "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

              "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

              1 Reply Last reply
              0
              • P Paresh Chitte

                Hi, I am using a CListCtrl with check boxes for the row (using LVS_EX_CHECKBOXES). Now, my requirement is to use check box in column header of the CListCtrl so that I can "Select All" or "Deselect All" items in list on a single click. Any help would be appreciated. Regards, Paresh.

                P Offline
                P Offline
                Paresh Chitte
                wrote on last edited by
                #7

                Found solution here[^]. Thank you all for your replies. Regards, Paresh.

                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