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. make highlight cover entire length of all columns in CListCtrl

make highlight cover entire length of all columns in CListCtrl

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

    how do you make the selected item highlight the full, entire length of all the columns in a CListCtrl. this is hard to explain... please look at the attached picture to see what I am talking about.

    L E 2 Replies Last reply
    0
    • D Derek

      how do you make the selected item highlight the full, entire length of all the columns in a CListCtrl. this is hard to explain... please look at the attached picture to see what I am talking about.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Either ListView_SetExtendedListViewStyle(m_hWndYourListViewHwnd,LVS_EX_FULLROWSELECT); or SendMessage( m_hWndListviewhwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)LVS_EX_FULLROWSELECT ); ================== The original message was: how do you make the selected item highlight the full, entire length of all the columns
      in a CListCtrl. this is hard to explain... please look at the attached picture to see what I
      am talking about.

      U 1 Reply Last reply
      0
      • L Lost User

        Either ListView_SetExtendedListViewStyle(m_hWndYourListViewHwnd,LVS_EX_FULLROWSELECT); or SendMessage( m_hWndListviewhwnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)LVS_EX_FULLROWSELECT ); ================== The original message was: how do you make the selected item highlight the full, entire length of all the columns
        in a CListCtrl. this is hard to explain... please look at the attached picture to see what I
        am talking about.

        U Offline
        U Offline
        User 5771346
        wrote on last edited by
        #3

        ... or CListCtrl& ctlList = GetListCtrl(); ctlList.SetExtendedStyle( LVS_EX_FULLROWSELECT );

        1 Reply Last reply
        0
        • D Derek

          how do you make the selected item highlight the full, entire length of all the columns in a CListCtrl. this is hard to explain... please look at the attached picture to see what I am talking about.

          E Offline
          E Offline
          Erik Thompson
          wrote on last edited by
          #4

          You need to call SetExtendedStyle with the LVS_EX_FULLROWSELECT after the window has been created. A good place to do this may be when you add the columns to the list control object. It requires Version 4.70 of common controls dll which is available with IE3+. Hope it helps.

          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