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. how to know which column been clicked CListCtrl

how to know which column been clicked CListCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
3 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.
  • S Offline
    S Offline
    swarup
    wrote on last edited by
    #1

    hi guys i want some info, i have CListCtrl. i want to know whicj column has been clicked by user, if user clicked on a particular column header how to know which column it is,

    N N 2 Replies Last reply
    0
    • S swarup

      hi guys i want some info, i have CListCtrl. i want to know whicj column has been clicked by user, if user clicked on a particular column header how to know which column it is,

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      swarup wrote:

      if user clicked on a particular column header how to know which column it is

      When a user clickes on the header, it will get the LVN_COLUMNCLICK notication. the lparam is a NMLISTVIEW pointer. The iSubItem member of that struct will have the column number void MyDlg::OnColumnclickList1(NMHDR* pNMHDR, LRESULT* pResult) { NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR; int nColumn = pNMListView->iSubItem;// Column user clicked }

      nave [OpenedFileFinder]

      1 Reply Last reply
      0
      • S swarup

        hi guys i want some info, i have CListCtrl. i want to know whicj column has been clicked by user, if user clicked on a particular column header how to know which column it is,

        N Offline
        N Offline
        Nelek
        wrote on last edited by
        #3

        Hi, for the header... I'm not sure, but for normal places... you can check which item (row) is, and compare the subitems (columns). In any case I recommend you to take a look in the CListCtrl articles that are in the site. They would explain you a lot and maybe give you some idea or direct solution.

        Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

        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