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. subclassing and messages

subclassing and messages

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

    If you subclass a CListCtrl and call it CMyListCtrl and then use the CMyListCtrl as a member variable in a dialog box, some of the messages are caught by the parent dialog and some are sent to the CMyListCtrl. I was wondering if there is a way to direct these to catch these in my actual dialog instead of in my control.

    R T 2 Replies Last reply
    0
    • R RK_2000

      If you subclass a CListCtrl and call it CMyListCtrl and then use the CMyListCtrl as a member variable in a dialog box, some of the messages are caught by the parent dialog and some are sent to the CMyListCtrl. I was wondering if there is a way to direct these to catch these in my actual dialog instead of in my control.

      R Offline
      R Offline
      Renjith Ramachandran
      wrote on last edited by
      #2

      PreTranslateMessage() Renjith-CPian.

      1 Reply Last reply
      0
      • R RK_2000

        If you subclass a CListCtrl and call it CMyListCtrl and then use the CMyListCtrl as a member variable in a dialog box, some of the messages are caught by the parent dialog and some are sent to the CMyListCtrl. I was wondering if there is a way to direct these to catch these in my actual dialog instead of in my control.

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

        It seems you've used message reflection to handle control notifications. If you want to give dialog a chance to handle them as well, use ON_NOTIFY_REFLECT_EX and return FALSE from handler defined in control class. Tomasz Sowinski -- http://www.shooltz.com

        Free your mind and your ass will follow.

        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