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 with CListCtrl

Selecting a row with CListCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 3 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.
  • G Offline
    G Offline
    Goncalo
    wrote on last edited by
    #1

    Does anibody know if there's a similar function like CListBox::SetCurSel, in class CListCtrl? In a multiple column CListCtrl, is it possible to select the entire row instead of only the first column? Thanks!!!

    M 1 Reply Last reply
    0
    • G Goncalo

      Does anibody know if there's a similar function like CListBox::SetCurSel, in class CListCtrl? In a multiple column CListCtrl, is it possible to select the entire row instead of only the first column? Thanks!!!

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2
      1. CListCtrl::SetItemState() 2) Yep, set the full row select extended style of the control.
      A 1 Reply Last reply
      0
      • M Michael Dunn
        1. CListCtrl::SetItemState() 2) Yep, set the full row select extended style of the control.
        A Offline
        A Offline
        Ariel
        wrote on last edited by
        #3

        Hi there, How do you select the "set the full row select extended style of the control" ?? Thanks in advanced, Ariel.

        M 1 Reply Last reply
        0
        • A Ariel

          Hi there, How do you select the "set the full row select extended style of the control" ?? Thanks in advanced, Ariel.

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          In MFC: yourListCtrl.SetExtendedStyle(LVS_EX_FULLROWSELECT|yourListCtrl.GetExtendedStyle()); In straight API: ListView_SetExtendedListViewStyleEx(hwndYourList, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT); --Mike-- http://home.inreach.com/mdunn/ This must be Thursday. I never could get the hang of Thursdays...

          A 1 Reply Last reply
          0
          • M Michael Dunn

            In MFC: yourListCtrl.SetExtendedStyle(LVS_EX_FULLROWSELECT|yourListCtrl.GetExtendedStyle()); In straight API: ListView_SetExtendedListViewStyleEx(hwndYourList, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT); --Mike-- http://home.inreach.com/mdunn/ This must be Thursday. I never could get the hang of Thursdays...

            A Offline
            A Offline
            Ariel
            wrote on last edited by
            #5

            Thanks alot for this its working perfectly !!! Hope to be able to help you once, Ariel.

            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