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 handle notify message in both reflect way and normal way?

How to handle notify message in both reflect way and normal way?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 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.
  • F Offline
    F Offline
    followait
    wrote on last edited by
    #1

    CMyListCtrl::OnClick(NMHDR* pNMHDR, LRESULT* pResult)

    And the parent window need to handel NM_CLICK from the list ctrl too. Now only the handler in CMyListCtrl will be executed. How to let both handlers work? Thanks.

    A 1 Reply Last reply
    0
    • F followait

      CMyListCtrl::OnClick(NMHDR* pNMHDR, LRESULT* pResult)

      And the parent window need to handel NM_CLICK from the list ctrl too. Now only the handler in CMyListCtrl will be executed. How to let both handlers work? Thanks.

      A Offline
      A Offline
      Alexander M
      wrote on last edited by
      #2

      MFC's global message handler will always use the first handler found. That means you have to forward the message to the parent window yourself.

      Don't try it, just do it! ;-)

      F 2 Replies Last reply
      0
      • A Alexander M

        MFC's global message handler will always use the first handler found. That means you have to forward the message to the parent window yourself.

        Don't try it, just do it! ;-)

        F Offline
        F Offline
        followait
        wrote on last edited by
        #3

        It doesn't work. When I send WM_NOTIFY in the ctrl's notify message handler, it seems that there is a deadlock.

        1 Reply Last reply
        0
        • A Alexander M

          MFC's global message handler will always use the first handler found. That means you have to forward the message to the parent window yourself.

          Don't try it, just do it! ;-)

          F Offline
          F Offline
          followait
          wrote on last edited by
          #4

          Just another way, send my msg instead. :laugh:

          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