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. HDN_ITEMCHANGED mesage on CListView

HDN_ITEMCHANGED mesage on CListView

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • W Offline
    W Offline
    Wim Jans
    wrote on last edited by
    #1

    Hello, I want to do something whenever on of the header columns in my CListView changes in size. For that I catch the HDN_ITEMCHANGED message. But that one is not fired in the CListView. What I have is a message entry: ON_NOTIFY_REFLECT(HDN_ITEMCHANGED, OnItemchanged) I've read the article by Matt Damon 'Using the CHeaderCtrl', and he mentions something about that, but the article is based on the CListCtrl, not the CListView, so the workaroud doesn't seem applicable for me. Anyone knows how this message is fired in the CListView? Thanks Wim

    M 1 Reply Last reply
    0
    • W Wim Jans

      Hello, I want to do something whenever on of the header columns in my CListView changes in size. For that I catch the HDN_ITEMCHANGED message. But that one is not fired in the CListView. What I have is a message entry: ON_NOTIFY_REFLECT(HDN_ITEMCHANGED, OnItemchanged) I've read the article by Matt Damon 'Using the CHeaderCtrl', and he mentions something about that, but the article is based on the CListCtrl, not the CListView, so the workaroud doesn't seem applicable for me. Anyone knows how this message is fired in the CListView? Thanks Wim

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      WM_NOTIFY messages are sent by a control to its parent. So HDN_* messages are sent from the header to the list. Therefore, ON_NOTIFY_REFLECT is the wrong macro to use since the message isn't sent by the list. (That would be right if you were trying to handle, say LVN_ITEMCHANGED) Use regular ON_NOTIFY. --Mike-- Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber CP SearchBar v2.0.2 released

      W 1 Reply Last reply
      0
      • M Michael Dunn

        WM_NOTIFY messages are sent by a control to its parent. So HDN_* messages are sent from the header to the list. Therefore, ON_NOTIFY_REFLECT is the wrong macro to use since the message isn't sent by the list. (That would be right if you were trying to handle, say LVN_ITEMCHANGED) Use regular ON_NOTIFY. --Mike-- Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber CP SearchBar v2.0.2 released

        W Offline
        W Offline
        Wim Jans
        wrote on last edited by
        #3

        Thanks Michael, That worked like a charm Regards Wim

        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