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. clistctrl question

clistctrl question

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

    i have a 1 to many dialog i show one record of many and have a list showing all. i would like have the list hilight the current record while either browsing or editting the current one. So my actual question is: Is there a way to hilight a row on a listcontrol without having focus?

    T 1 Reply Last reply
    0
    • J jafrazee

      i have a 1 to many dialog i show one record of many and have a list showing all. i would like have the list hilight the current record while either browsing or editting the current one. So my actual question is: Is there a way to hilight a row on a listcontrol without having focus?

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      listCtrl.SetItemState(index, LVIS_SELECTED, LVIS_SELECTED); Tomasz Sowinski -- http://www.shooltz.com

      J 1 Reply Last reply
      0
      • T Tomasz Sowinski

        listCtrl.SetItemState(index, LVIS_SELECTED, LVIS_SELECTED); Tomasz Sowinski -- http://www.shooltz.com

        J Offline
        J Offline
        jafrazee
        wrote on last edited by
        #3

        i have tried that but the row is only hilighted with the control has focus. as soon as focus is lost the hilight also goes away. would be greatful for anyother suggestions. thank you.

        T 1 Reply Last reply
        0
        • J jafrazee

          i have tried that but the row is only hilighted with the control has focus. as soon as focus is lost the hilight also goes away. would be greatful for anyother suggestions. thank you.

          T Offline
          T Offline
          Tomasz Sowinski
          wrote on last edited by
          #4

          Do you have 'Show selection always' option set in the dialog editor? If you're creating list control dynamically, use LVS_SHOWSELALWAYS style. Tomasz Sowinski -- http://www.shooltz.com

          J 1 Reply Last reply
          0
          • T Tomasz Sowinski

            Do you have 'Show selection always' option set in the dialog editor? If you're creating list control dynamically, use LVS_SHOWSELALWAYS style. Tomasz Sowinski -- http://www.shooltz.com

            J Offline
            J Offline
            jafrazee
            wrote on last edited by
            #5

            that is exactly the problem. thank you very much.

            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