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 Position in CListCtrl

Selecting Position in CListCtrl

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

    Hi , Ive classic List Control with some header stuff. Now i need to manually select row but i cant find any function such as "SelectItem" or similar or any other solution. Can anyone help me plz ? Thx in advance.

    A R O 3 Replies Last reply
    0
    • C Chernobog1

      Hi , Ive classic List Control with some header stuff. Now i need to manually select row but i cant find any function such as "SelectItem" or similar or any other solution. Can anyone help me plz ? Thx in advance.

      A Offline
      A Offline
      Anthony_Yio
      wrote on last edited by
      #2

      CListCtrl::GetNextItem(-1, LVNI_SELECTED); This is for single selection only. Sonork 100.41263:Anthony_Yio

      1 Reply Last reply
      0
      • C Chernobog1

        Hi , Ive classic List Control with some header stuff. Now i need to manually select row but i cant find any function such as "SelectItem" or similar or any other solution. Can anyone help me plz ? Thx in advance.

        R Offline
        R Offline
        Roger Allen
        wrote on last edited by
        #3

        ctrl.SetItemState(index, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); Roger Allen Sonork 100.10016 Death come early, death come late, It takes us all, there is no reason. For every purpose under heaven, To each a turn, to each a season. A time to weep and a time to sigh, A time to laugh and a time to cry, A time to be born and a time to die. Dust to dust and ashes to ashes, And so I end my song.

        1 Reply Last reply
        0
        • C Chernobog1

          Hi , Ive classic List Control with some header stuff. Now i need to manually select row but i cant find any function such as "SelectItem" or similar or any other solution. Can anyone help me plz ? Thx in advance.

          O Offline
          O Offline
          ohadp
          wrote on last edited by
          #4

          You can use CListCtrl::SetItemState for example: SetItemState(index, LVIS_SELECTED, LVIS_SELECTED);

          C 1 Reply Last reply
          0
          • O ohadp

            You can use CListCtrl::SetItemState for example: SetItemState(index, LVIS_SELECTED, LVIS_SELECTED);

            C Offline
            C Offline
            Chernobog1
            wrote on last edited by
            #5

            Thank you, guys :)

            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