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. Find the focused item in ListCtrl

Find the focused item in ListCtrl

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.
  • C Offline
    C Offline
    Cyrus Dang
    wrote on last edited by
    #1

    Dear all, What is the fastest way to locate the focused item in CListCtrl object? BRs

    T 1 Reply Last reply
    0
    • C Cyrus Dang

      Dear all, What is the fastest way to locate the focused item in CListCtrl object? BRs

      T Offline
      T Offline
      Tom Wright
      wrote on last edited by
      #2

      GetSelectionMark(). Tom Wright tawright915@yahoo.com

      C 1 Reply Last reply
      0
      • T Tom Wright

        GetSelectionMark(). Tom Wright tawright915@yahoo.com

        C Offline
        C Offline
        Cyrus Dang
        wrote on last edited by
        #3

        Thanks Tom, While waiting for your replies, I found a solution. That is GetNextItem(-1, LVIS_FOCUSED) Thanks anyway. BRs

        S 1 Reply Last reply
        0
        • C Cyrus Dang

          Thanks Tom, While waiting for your replies, I found a solution. That is GetNextItem(-1, LVIS_FOCUSED) Thanks anyway. BRs

          S Offline
          S Offline
          Serge Krynine
          wrote on last edited by
          #4

          Just wandering why the CListCtrl::GetFirstSelectedItemPosition() is not good enough ?

          C 1 Reply Last reply
          0
          • S Serge Krynine

            Just wandering why the CListCtrl::GetFirstSelectedItemPosition() is not good enough ?

            C Offline
            C Offline
            Cyrus Dang
            wrote on last edited by
            #5

            Because I wanted to find the focused item, not selected item. By using GetNextItem(), I can directly locate the focused item and that's what I needed. BRs

            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